comparison mcabber/src/commands.c @ 1359:7daf906fbcdc

The command /quit can be used in bindings, hooks and sourced files (It used to work in bindings only)
author Mikael Berthe <mikael@lilotux.net>
date Sun, 11 Nov 2007 13:05:57 +0100
parents 7794d76ca90e
children 8613d3f4ae91
comparison
equal deleted inserted replaced
1358:005df14df743 1359:7daf906fbcdc
384 && (!strncasecmp(xpline, mkcmdstr("quit"), strlen(mkcmdstr("quit"))))) { 384 && (!strncasecmp(xpline, mkcmdstr("quit"), strlen(mkcmdstr("quit"))))) {
385 if (!xpline[5] || xpline[5] == ' ') { 385 if (!xpline[5] || xpline[5] == ' ') {
386 g_free(xpline); 386 g_free(xpline);
387 return 255; 387 return 255;
388 } 388 }
389 } else if (iscmd && !strncasecmp(xpline, "quit", 4) &&
390 (!xpline[4] || xpline[4] == ' ')) {
391 // If iscmd is true we can have the command without the command prefix
392 // character (usually '/').
393 g_free(xpline);
394 return 255;
389 } 395 }
390 396
391 // If verbatim multi-line mode, we check if another /msay command is typed 397 // If verbatim multi-line mode, we check if another /msay command is typed
392 if (!iscmd && scr_get_multimode() == 2 398 if (!iscmd && scr_get_multimode() == 2
393 && (strncasecmp(xpline, mkcmdstr("msay "), strlen(mkcmdstr("msay "))))) { 399 && (strncasecmp(xpline, mkcmdstr("msay "), strlen(mkcmdstr("msay "))))) {