diff mcabber/mcabber/commands.c @ 1749:7ee390513463

Use api version for module checks * Change module structures * Check for supported api versions at loading time * Add info command, description and module version fields
author Myhailo Danylenko <isbear@ukrpost.net>
date Sat, 13 Mar 2010 10:29:18 +0100
parents 5ef7629a96ff
children 106bbf7e97da
line wrap: on
line diff
--- a/mcabber/mcabber/commands.c	Fri Mar 12 19:13:56 2010 +0100
+++ b/mcabber/mcabber/commands.c	Sat Mar 13 10:29:18 2010 +0100
@@ -494,7 +494,7 @@
     }
     if (current_buddy) {
       if (buddy_gettype(BUDDATA(current_buddy)) & ROSTER_TYPE_GROUP)
-	do_group("toggle");
+        do_group("toggle");
       else {
         // Enter chat mode
         scr_set_chatmode(TRUE);
@@ -2967,7 +2967,7 @@
   if (!args[0] || !strcmp(args[0], "list")) {
     module_list_print();
   } else {
-    const gchar *error;
+    const gchar *error = NULL;
     const gchar *name = args[1];
 
     if (name && name[0] == '-' && name[1] == 'f') {
@@ -2981,6 +2981,8 @@
       error = module_load(name, TRUE, force);
     else if (!strcmp(args[0], "unload"))
       error = module_unload(name, TRUE, force);
+    else if (!strcmp(args[0], "info"))
+      module_info_print(name);
     else
       error = "Unknown subcommand";
     if (error)