]> Cypherpunks.ru repositories - goircd.git/blobdiff - client.go
Ability to authenticate users by nickname↔password database
[goircd.git] / client.go
index afd6312714837e70b8c89550575054ac5efd7341..4f48daf90be4f1f0981b96f6e30ca04fa1f438a0 100644 (file)
--- a/client.go
+++ b/client.go
@@ -37,6 +37,7 @@ type Client struct {
        nickname   string
        username   string
        realname   string
+       password   string
 }
 
 type ClientAlivenessState struct {
@@ -49,7 +50,7 @@ func (client Client) String() string {
 }
 
 func NewClient(hostname string, conn net.Conn) *Client {
-       return &Client{hostname: hostname, conn: conn, nickname: "*"}
+       return &Client{hostname: hostname, conn: conn, nickname: "*", password: ""}
 }
 
 // Client processor blockingly reads everything remote client sends,
@@ -64,7 +65,6 @@ func (client *Client) Processor(sink chan<- ClientEvent) {
                bufNet = make([]byte, BufSize)
                _, err := client.conn.Read(bufNet)
                if err != nil {
-                       log.Println(client, "connection lost", err)
                        sink <- ClientEvent{client, EventDel, ""}
                        break
                }