src/irc.c
changeset 23 1cd79bb84e9c
parent 22 b786b5f92a93
child 29 08ec6ddd6eea
equal deleted inserted replaced
22:b786b5f92a93 23:1cd79bb84e9c
   290             case 2:
   290             case 2:
   291             case 3:
   291             case 3:
   292             case 4:
   292             case 4:
   293             case 5:
   293             case 5:
   294             case 250:
   294             case 250:
   295             case 251:
   295             case 251:          /* NUMBER OF USERS */
   296             case 252:
   296             case 252:          /* STAFF MEMBERS */
   297             case 254:
   297             case 254:          /* CHANNELS */
   298             case 255:
   298             case 255:          /* CLIENTS */
   299             case 265:
   299             case 265:          /* LOCAL USERS */
   300             case 266:
   300             case 266:          /* GLOBAL USERS */
   301                 /*
   301                 /*
   302                  * prints as is in irc_login
   302                  * prints as is in irc_login
   303                  */
   303                  */
   304                 return command;
   304                 return command;
   305             case 311:
   305             case 311:
   334             case 403:          /* THAT CHANNEL DOESN'T EXIST */
   334             case 403:          /* THAT CHANNEL DOESN'T EXIST */
   335             case 412:          /* NO TEXT TO SEND */
   335             case 412:          /* NO TEXT TO SEND */
   336             case 441:          /* THEY AREN'T ON THIS CHANNEL */
   336             case 441:          /* THEY AREN'T ON THIS CHANNEL */
   337                 message->channel = strtok (message->line, " ");
   337                 message->channel = strtok (message->line, " ");
   338                 message->line = strtok (NULL, "\r\n");
   338                 message->line = strtok (NULL, "\r\n");
   339                 fprintf (message->stream, "PRIVMSG %s :%s\r\n", message->current_channel, message->line);
       
   340                 return command;
   339                 return command;
   341             case 433:          /* NICK ALREADY IN USE */
   340             case 433:          /* NICK ALREADY IN USE */
   342             case 451:          /* REGISTER FIRST */
   341             case 451:          /* REGISTER FIRST */
   343                 return command;
   342                 return command;
   344             case 474:
   343             case 474:
   345             case 475:
   344             case 475:
   346             case 476:
   345             case 476:
   347             case 477:
   346             case 477:          /* HOW TO GET HELP */
   348             case 486:          /* MUST BE REGISTERED TO SEND PRIVATE MESSAGES */
   347             case 486:          /* MUST BE REGISTERED TO SEND PRIVATE MESSAGES */
   349             case 482:
   348             case 482:
   350             case 901:          /* notify or some crap */
   349             case 901:          /* notify or some crap */
   351                 message->channel = strtok (message->line, " ");
   350                 message->channel = strtok (message->line, " ");
   352                 message->line = strtok (NULL, "\r\n");
   351                 message->line = strtok (NULL, "\r\n");