names testing

This commit is contained in:
blackbeard420 2020-01-05 22:28:08 -05:00
parent ea8ae29c4c
commit b2db19888e

7
irc.go
View File

@ -22,6 +22,7 @@ type Connection struct {
joined bool
channels []string
curNick string
userList map[string][]string
}
//SendPong replies to the received PING
@ -100,7 +101,6 @@ func GetNick(name string) string {
}
//TODO: simplify this to pass gocyclo
//TODO: handle NICK messages
func (c *Connection) parseMessage(line string) {
if line[0] == ':' {
buf := line[1:]
@ -119,6 +119,11 @@ func (c *Connection) parseMessage(line string) {
c.joined = true
}
}
if cmd == "353" {
log.Printf("names: %s\n", args)
}
if c.NumericCallback != nil {
code, _ := strconv.Atoi(cmd)
c.NumericCallback(from, code, args)