names testing
This commit is contained in:
parent
ea8ae29c4c
commit
b2db19888e
7
irc.go
7
irc.go
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user