Merge pull request #47 from wathiede/master

client: track bot mode on who replies.
This commit is contained in:
Alex Bee 2014-10-04 21:11:23 +01:00
commit 8904032daa
1 changed files with 5 additions and 1 deletions

View File

@ -4,8 +4,9 @@ package client
// to manage tracking state for an IRC connection // to manage tracking state for an IRC connection
import ( import (
"github.com/fluffle/goirc/logging"
"strings" "strings"
"github.com/fluffle/goirc/logging"
) )
var stHandlers = map[string]HandlerFunc{ var stHandlers = map[string]HandlerFunc{
@ -177,6 +178,9 @@ func (conn *Conn) h_352(line *Line) {
if idx := strings.Index(line.Args[6], "*"); idx != -1 { if idx := strings.Index(line.Args[6], "*"); idx != -1 {
nk.Modes.Oper = true nk.Modes.Oper = true
} }
if idx := strings.Index(line.Args[6], "B"); idx != -1 {
nk.Modes.Bot = true
}
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
} }