diff mcabber/src/commands.c @ 1592:1802b926e3fa

Display a warning when using /request while disconnected
author Mikael Berthe <mikael@lilotux.net>
date Tue, 06 Oct 2009 21:22:51 +0200
parents 5411897a1e7b
children a087125d8fc8
line wrap: on
line diff
--- a/mcabber/src/commands.c	Sun Oct 04 20:56:16 2009 +0200
+++ b/mcabber/src/commands.c	Tue Oct 06 21:22:51 2009 +0200
@@ -3114,6 +3114,12 @@
     return;
   }
 
+  if (!jb_getonline()) {
+    scr_LogPrint(LPRINT_NORMAL, "You are not connected.");
+    free_arg_lst(paramlst);
+    return;
+  }
+
   // Allow special jid "" or "." (current buddy)
   if (fjid && (!*fjid || !strcmp(fjid, ".")))
     fjid = NULL;