Mercurial > hg
changeset 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 | ec5d5a9fef76 |
files | mcabber/src/commands.c |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;