disco.c
changeset 27 0539bca09f11
parent 26 91987ea19f24
child 28 ff36ae7e2b1e
--- a/disco.c	Mon Feb 15 17:51:21 2010 +0200
+++ b/disco.c	Thu Mar 04 19:50:56 2010 +0200
@@ -19,7 +19,6 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
 #include <glib.h>
-#include <gmodule.h>
 #include <loudmouth/loudmouth.h>
 #include <string.h>
 
@@ -32,12 +31,27 @@
 #include <mcabber/xmpp_defines.h>
 #include <mcabber/screen.h>
 #include <mcabber/hbuf.h>
+#include <mcabber/modules.h>
 
 #include "disco.h"
 
 #include "config.h"
 
 //
+// module description
+//
+
+static void disco_init   (void);
+static void disco_uninit (void);
+
+module_info_t info_disco = {
+	.mcabber_version = "0.10.0",
+	.requires        = NULL,
+	.init            = disco_init,
+	.uninit          = disco_uninit,
+};
+
+//
 // private types
 //
 
@@ -598,7 +612,7 @@
 	return;
 }
 
-const gchar *g_module_check_init(GModule *module)
+static void disco_init (void)
 {
 	// completion
 	disco_cid = compl_new_category ();
@@ -613,10 +627,10 @@
 	// command
 	cmd_add ("disco", "", disco_cid, COMPL_JID, do_disco, NULL);
 
-	return NULL;
+	return;
 }
 
-void g_module_unload(GModule *module)
+static void disco_uninit (void)
 {
 	// command
 	cmd_del ("disco");