mirror of https://github.com/fluffle/goirc
Merge pull request #33 from StalkR/who
352 who reply: do not warn if nick is me
This commit is contained in:
commit
4d7d690159
|
@ -158,7 +158,15 @@ func (conn *Conn) h_332(line *Line) {
|
||||||
|
|
||||||
// Handle 352 who reply
|
// Handle 352 who reply
|
||||||
func (conn *Conn) h_352(line *Line) {
|
func (conn *Conn) h_352(line *Line) {
|
||||||
if nk := conn.st.GetNick(line.Args[5]); nk != nil && nk != conn.Me() {
|
nk := conn.st.GetNick(line.Args[5])
|
||||||
|
if nk == nil {
|
||||||
|
logging.Warn("irc.352(): received WHO reply for unknown nick %s",
|
||||||
|
line.Args[5])
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if nk == conn.Me() {
|
||||||
|
return
|
||||||
|
}
|
||||||
nk.Ident = line.Args[2]
|
nk.Ident = line.Args[2]
|
||||||
nk.Host = line.Args[3]
|
nk.Host = line.Args[3]
|
||||||
// XXX: do we care about the actual server the nick is on?
|
// XXX: do we care about the actual server the nick is on?
|
||||||
|
@ -172,10 +180,6 @@ func (conn *Conn) h_352(line *Line) {
|
||||||
if idx := strings.Index(line.Args[6], "H"); idx != -1 {
|
if idx := strings.Index(line.Args[6], "H"); idx != -1 {
|
||||||
nk.Modes.Invisible = true
|
nk.Modes.Invisible = true
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
logging.Warn("irc.352(): received WHO reply for unknown nick %s",
|
|
||||||
line.Args[5])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle 353 names reply
|
// Handle 353 names reply
|
||||||
|
|
Loading…
Reference in New Issue