fixed IRCParser bug (we shouldn't check chanuser after freeing it ;))
authorpk910 <philipp@zoelle1.de>
Tue, 29 Nov 2011 22:25:10 +0000 (23:25 +0100)
committerpk910 <philipp@zoelle1.de>
Tue, 29 Nov 2011 22:25:10 +0000 (23:25 +0100)
src/IRCParser.c

index 38b02a4563db3caa0d485d3784c15cf718b96b25..b3fa2506a9455e925026d6ba964d341d1b300204 100644 (file)
@@ -290,11 +290,11 @@ static IRC_CMD(raw_kick) {
         struct ChanUser *chanuser = getChanUser(target, chan);
         delChanUser(chanuser, 0); //we need to free the chanuser manually!
         event_kick(user, chanuser, argv[1]);
-        freeChanUser(chanuser);
         if(chanuser->chan->chanbot == user) {
             //check if theres another bot in the channel - otherwise free it
             checkChannelVisibility(chan);
         }
+        freeChanUser(chanuser);
     }
     if(target->channel == NULL && !(target->flags & USERFLAG_ISBOT)) {
         //remove the user