From d831bc9bbad5cfb6a4fe794fda111a6e9fb8334d Mon Sep 17 00:00:00 2001 From: Thomas Jager Date: Thu, 28 Jul 2016 18:20:26 +0200 Subject: [PATCH] Retry last fix --- irc_nicktrack.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) + } }) }