comment/comment.c
changeset 40 5cd4b42ada91
parent 37 a05815df848c
--- a/comment/comment.c	Sat Nov 06 22:25:34 2010 +0100
+++ b/comment/comment.c	Sun Mar 27 21:05:47 2011 +0200
@@ -37,6 +37,10 @@
         .next           = NULL,
 };
 
+#ifdef MCABBER_API_HAVE_CMD_ID
+static gpointer comment_cmdid;
+#endif
+
 static void do_comment(char *args)
 {
   /* This is actually a no-op! */
@@ -46,14 +50,22 @@
 static void comment_init(void)
 {
   /* Add command */
+#ifdef MCABBER_API_HAVE_CMD_ID
+  comment_cmdid = cmd_add("#", "Ignore", 0, 0, do_comment, NULL);
+#else
   cmd_add("#", "Ignore", 0, 0, do_comment, NULL);
+#endif
 }
 
 /* Deinitialization */
 static void comment_uninit(void)
 {
   /* Unregister command */
+#ifdef MCABBER_API_HAVE_CMD_ID
+  cmd_del(comment_cmdid);
+#else
   cmd_del("comment");
+#endif
 }
 
 /* vim: set expandtab cindent cinoptions=>2\:2(0:  For Vim users... */