# HG changeset patch # User Mikael Berthe # Date 1208013332 -7200 # Node ID 477581e3b95ee8dd5c708529354be0e4fc79d4db # Parent 2b43d89a10bb501802c020390f2d16e953f1ee4a "status message" expects a message diff -r 2b43d89a10bb -r 477581e3b95e mcabber/src/commands.c --- a/mcabber/src/commands.c Sat Apr 12 13:49:18 2008 +0200 +++ b/mcabber/src/commands.c Sat Apr 12 17:15:32 2008 +0200 @@ -828,8 +828,15 @@ else if (!strcasecmp(status, IMSTATUS_DONOTDISTURB)) st = dontdisturb; else if (!strcasecmp(status, IMSTATUS_NOTAVAILABLE)) st = notavail; else if (!strcasecmp(status, IMSTATUS_FREE4CHAT)) st = freeforchat; - else if (!strcasecmp(status, "message")) st = jb_getstatus(); - else { + else if (!strcasecmp(status, "message")) { + if (!msg || !*msg) { + // We want a message. If there's none, we give up. + scr_LogPrint(LPRINT_NORMAL, "Missing parameter."); + free_arg_lst(paramlst); + return; + } + st = jb_getstatus(); // Preserve current status + } else { scr_LogPrint(LPRINT_NORMAL, "Unrecognized status!"); free_arg_lst(paramlst); return;