Fix formatting and input/output channels

configurable-file-paths
Robert Gerus 2015-10-20 11:02:29 +02:00
parent e4f95d5909
commit 1da17d95d5
1 changed files with 12 additions and 10 deletions

View File

@ -69,20 +69,22 @@ func (c Connection) Dial(server string, nick string, user string, realname strin
log.Println(c.Network, "Connected to", server)
c.Writer = bufio.NewWriter(conn)
c.Reader = bufio.NewReader(conn)
c.Input = make(chan Message, 1)
c.Output = make(chan Message, 1)
go c.Sender()
go c.Receiver()
log.Println(c.Network, "Initializing IRC connection")
c.Input <- Message{
Command: "NICK",
Trailing: nick,
}
c.Input <- Message{
Command: "USER",
Params: []string{user, "0", "*"},
Trailing: realname,
}
log.Println(c.Network, "Initializing IRC connection")
c.Input <- Message{
Command: "NICK",
Trailing: nick,
}
c.Input <- Message{
Command: "USER",
Params: []string{user, "0", "*"},
Trailing: realname,
}
return nil
}