From: pk910 Date: Wed, 21 Sep 2011 13:48:48 +0000 (+0200) Subject: fixed parsing of PART raws X-Git-Tag: v5.3~382 X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;h=8f316535c437683bcacd6bbe05a3b103dfb7849d;p=NeonServV5.git fixed parsing of PART raws --- diff --git a/IRCParser.c b/IRCParser.c index 626c51d..60ba4ef 100644 --- a/IRCParser.c +++ b/IRCParser.c @@ -125,7 +125,7 @@ static IRC_CMD(raw_join) { } static IRC_CMD(raw_part) { - if(from == NULL || argc < 2) return 0; + if(from == NULL || argc < 1) return 0; struct UserNode *user = getUserByMask(from); if(user == NULL) return 0; struct ChanNode *chan = getChanByName(argv[0]); @@ -133,7 +133,7 @@ static IRC_CMD(raw_part) { if(isUserOnChan(user, chan) && (chan->flags & CHANFLAG_RECEIVED_USERLIST)) { struct ChanUser *chanuser = getChanUser(user, chan); delChanUser(chanuser, 0); //we need to free the chanuser manually! - event_part(chanuser, argv[1]); + event_part(chanuser, (argc > 1 ? argv[1] : NULL)); free(chanuser); if(chan->chanbot == user) { //check if theres another bot in the channel - otherwise free it