fixed parsing of QUIT raws
authorpk910 <philipp@zoelle1.de>
Tue, 20 Sep 2011 23:19:33 +0000 (01:19 +0200)
committerpk910 <philipp@zoelle1.de>
Tue, 20 Sep 2011 23:19:33 +0000 (01:19 +0200)
IRCParser.c

index c13e477678c1fdd7ea1522479aa8d6ec2f6afcf2..626c51ddf8198b85b2d3d76538ca824a68bd27e6 100644 (file)
@@ -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;