comparison mcabber/src/commands.c @ 1463:477581e3b95e

"status message" expects a message
author Mikael Berthe <mikael@lilotux.net>
date Sat, 12 Apr 2008 17:15:32 +0200
parents 2b43d89a10bb
children 7b36b91a4388
comparison
equal deleted inserted replaced
1462:2b43d89a10bb 1463:477581e3b95e
826 else if (!strcasecmp(status, IMSTATUS_AWAY)) st = away; 826 else if (!strcasecmp(status, IMSTATUS_AWAY)) st = away;
827 else if (!strcasecmp(status, IMSTATUS_INVISIBLE)) st = invisible; 827 else if (!strcasecmp(status, IMSTATUS_INVISIBLE)) st = invisible;
828 else if (!strcasecmp(status, IMSTATUS_DONOTDISTURB)) st = dontdisturb; 828 else if (!strcasecmp(status, IMSTATUS_DONOTDISTURB)) st = dontdisturb;
829 else if (!strcasecmp(status, IMSTATUS_NOTAVAILABLE)) st = notavail; 829 else if (!strcasecmp(status, IMSTATUS_NOTAVAILABLE)) st = notavail;
830 else if (!strcasecmp(status, IMSTATUS_FREE4CHAT)) st = freeforchat; 830 else if (!strcasecmp(status, IMSTATUS_FREE4CHAT)) st = freeforchat;
831 else if (!strcasecmp(status, "message")) st = jb_getstatus(); 831 else if (!strcasecmp(status, "message")) {
832 else { 832 if (!msg || !*msg) {
833 // We want a message. If there's none, we give up.
834 scr_LogPrint(LPRINT_NORMAL, "Missing parameter.");
835 free_arg_lst(paramlst);
836 return;
837 }
838 st = jb_getstatus(); // Preserve current status
839 } else {
833 scr_LogPrint(LPRINT_NORMAL, "Unrecognized status!"); 840 scr_LogPrint(LPRINT_NORMAL, "Unrecognized status!");
834 free_arg_lst(paramlst); 841 free_arg_lst(paramlst);
835 return; 842 return;
836 } 843 }
837 844