From 76f7ca7d20c962e477b6f1f17d8c25245ec0d4bf Mon Sep 17 00:00:00 2001 From: pk910 Date: Wed, 21 Sep 2011 01:19:33 +0200 Subject: [PATCH] fixed parsing of QUIT raws --- IRCParser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IRCParser.c b/IRCParser.c index c13e477..626c51d 100644 --- a/IRCParser.c +++ b/IRCParser.c @@ -86,7 +86,7 @@ static void parse_raw(struct ClientSocket *client, char *from, char *cmd, char * if(!irc_cmd) { event_raw(client, from, cmd, argv, argc); } else if(!ret) { - fprintf(stderr,"PARSE ERROR: %s", cmd); + fprintf(stderr,"PARSE ERROR: %s\n", cmd); } } @@ -148,11 +148,11 @@ static IRC_CMD(raw_part) { } static IRC_CMD(raw_quit) { - if(from == NULL || argc < 2) return 0; + if(from == NULL || argc < 1) return 0; struct UserNode *user = getUserByMask(from); if(user == NULL) return 0; delUser(user, 0); //a little bit crazy, but we want to delete the user on the channel's userlists - but not the users channel list - event_quit(user, argv[1]); + event_quit(user, argv[0]); if(user->flags & USERFLAG_ISBOT) { //check if there are other bots in the users channel - otherwise free them struct ChanUser *chanuser, *next; -- 2.20.1