From 09765bab654aeb56ad8baf64cb0d57fb8d32b7f2 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Tue, 30 Sep 2014 15:01:45 -0700 Subject: [PATCH] client: track bot mode on who replies. --- client/state_handlers.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/state_handlers.go b/client/state_handlers.go index cb45c9c..5bff1cf 100644 --- a/client/state_handlers.go +++ b/client/state_handlers.go @@ -4,8 +4,9 @@ package client // to manage tracking state for an IRC connection import ( - "github.com/fluffle/goirc/logging" "strings" + + "github.com/fluffle/goirc/logging" ) 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 { 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 { nk.Modes.Invisible = true }