comparison mcabber/mcabber/commands.c @ 2310:e26c7709e023

Let "::stuff" be treated as ":say :stuff" in chat mode
author Mikael Berthe <mikael@lilotux.net>
date Sat, 11 Feb 2017 20:19:36 +0100
parents f181418db215
children def5f64c253d
comparison
equal deleted inserted replaced
2309:e00ae0763468 2310:e26c7709e023
548 } 548 }
549 } 549 }
550 return; 550 return;
551 } 551 }
552 552
553 if (*line != COMMAND_CHAR) { 553 if (*line == COMMAND_CHAR && scr_get_multimode() != 2) {
554 // This isn't a command 554 if (*(line+1) != COMMAND_CHAR) {
555 if (scr_get_multimode()) 555 /* It is a command */
556 scr_append_multiline(line); 556 process_command(line, FALSE);
557 else 557 return;
558 say_cmd((char*)line, 0); 558 } else {
559 return; 559 /* Skip the first COMMAND_CHAR */
560 } 560 line++;
561 561 }
562 /* It is _probably_ a command -- except for verbatim multi-line mode */ 562 }
563 process_command(line, FALSE); 563
564 // This isn't a command
565 if (scr_get_multimode())
566 scr_append_multiline(line);
567 else
568 say_cmd((char*)line, 0);
564 } 569 }
565 570
566 // Helper routine for buffer item_{lock,unlock,toggle_lock} 571 // Helper routine for buffer item_{lock,unlock,toggle_lock}
567 // "lock" values: 1=lock 0=unlock -1=invert 572 // "lock" values: 1=lock 0=unlock -1=invert
568 static void roster_buddylock(char *bjid, int lock) 573 static void roster_buddylock(char *bjid, int lock)