From 8f316535c437683bcacd6bbe05a3b103dfb7849d Mon Sep 17 00:00:00 2001 From: pk910 Date: Wed, 21 Sep 2011 15:48:48 +0200 Subject: [PATCH] fixed parsing of PART raws --- IRCParser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.20.1