diff --git a/irc_nicktrack.go b/irc_nicktrack.go index 25c2826..65d3d70 100644 --- a/irc_nicktrack.go +++ b/irc_nicktrack.go @@ -91,12 +91,13 @@ func (irc *Connection) SetupNickTrack() { }) irc.AddCallback("PART", func(e *Event) { - channelName := e.Nick + channelName := e.Arguments[0] delete(irc.Channels[channelName].Users, e.Nick) }) irc.AddCallback("QUIT", func(e *Event) { - channelName := e.Nick - delete(irc.Channels[channelName].Users, e.Nick) + for k, _ := range irc.Channels { + delete(irc.Channels[k].Users, e.Nick) + } }) }