Add a warning when using /module info with no module name
authorMikael Berthe <mikael@lilotux.net>
Sat, 13 Mar 2010 11:57:32 +0100
changeset 1755 84487d78d0ea
parent 1754 d8442bcb33b7
child 1756 e2c084204583
Add a warning when using /module info with no module name
mcabber/mcabber/modules.c
--- a/mcabber/mcabber/modules.c	Sat Mar 13 12:30:30 2010 +0200
+++ b/mcabber/mcabber/modules.c	Sat Mar 13 11:57:32 2010 +0100
@@ -350,6 +350,11 @@
   loaded_module_t *module;
   module_info_t *info;
 
+  if (!name || !name[0]) {
+    scr_LogPrint(LPRINT_NORMAL, "Please specify a module name.");
+    return;
+  }
+
   lmod = g_slist_find_custom(loaded_modules, name, module_list_comparator);
   if (!lmod) {
     scr_LogPrint(LPRINT_NORMAL, "Module %s not found.", name);