src/parse.c
changeset 8 3152de03758e
parent 3 a82a978f23f7
child 10 311ea5fa60dd
equal deleted inserted replaced
7:b04ef0b1cd3b 8:3152de03758e
    52     "!who", "!whois", "!time", "!tell",
    52     "!who", "!whois", "!time", "!tell",
    53     "!op",
    53     "!op",
    54     NULL,
    54     NULL,
    55 };
    55 };
    56 
    56 
    57 char *parse (MSG * message, short *active)
    57 char *parse (MSG * message)
    58 {
    58 {
    59     static char msg[513];
    59     static char msg[513];
    60     int cmd = -1;
    60     int cmd = -1;
    61     int i;
    61     int i;
    62     char *token;
    62     char *token;
   211             case 14:           /* !logout */
   211             case 14:           /* !logout */
   212                 if (strstr (message->user, db_lookup (DATABASE_FILE, "mcbot.user"))) {
   212                 if (strstr (message->user, db_lookup (DATABASE_FILE, "mcbot.user"))) {
   213                     if (strstr (message->email, db_lookup (DATABASE_FILE, "mcbot.email"))) {
   213                     if (strstr (message->email, db_lookup (DATABASE_FILE, "mcbot.email"))) {
   214                         snprintf (msg, 512, "PRIVMSG %s :%s!\r\nQUIT\r\n", message->channel,
   214                         snprintf (msg, 512, "PRIVMSG %s :%s!\r\nQUIT\r\n", message->channel,
   215                                   gettext ("Bye, have a nice day!"));
   215                                   gettext ("Bye, have a nice day!"));
   216                         *active = 0;
       
   217                     }
   216                     }
   218                 }
   217                 }
   219                 /*
   218                 /*
   220                  * the returned message is either the default one or the generated one
   219                  * the returned message is either the default one or the generated one
   221                  */
   220                  */