diff mcabber/src/commands.c @ 519:5c338d31de56

Show current global status message in "/status"
author Mikael Berthe <mikael@lilotux.net>
date Mon, 14 Nov 2005 18:47:08 +0100
parents 5a2132ba2220
children 2f714bd701a1
line wrap: on
line diff
--- a/mcabber/src/commands.c	Mon Nov 14 18:34:57 2005 +0100
+++ b/mcabber/src/commands.c	Mon Nov 14 18:47:08 2005 +0100
@@ -452,8 +452,10 @@
 static void do_status(char *arg)
 {
   if (!arg || (!*arg)) {
-    scr_LogPrint(LPRINT_NORMAL, "Your status is: %c",
-                 imstatus2char[jb_getstatus()]);
+    const char *sm = jb_getstatusmsg();
+    scr_LogPrint(LPRINT_NORMAL, "Your status is: [%c] %s",
+                 imstatus2char[jb_getstatus()],
+                 (sm ? sm : ""));
     return;
   }
   setstatus(NULL, arg);