]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_chat.c
mk_module_init.sh now tests to see if echo supports -e and -E
[citadel.git] / citadel / serv_chat.c
index 7bdc4894ef55a2d95624050b0c20e4b79050e1cb..a34f7efc390ce2f2032ccc15918657942a8a7307 100644 (file)
@@ -31,9 +31,7 @@
 #include <limits.h>
 #include "citadel.h"
 #include "server.h"
-#include "serv_extensions.h"
 #include "serv_chat.h"
-#include "sysdep_decls.h"
 #include "citserver.h"
 #include "support.h"
 #include "config.h"
 #include "snprintf.h"
 #endif
 
+
+#include "ctdl_module.h"
+
+
+
 struct ChatLine *ChatQueue = NULL;
 int ChatLastMsg = 0;
 
@@ -566,7 +569,7 @@ int send_instant_message(char *lun, char *x_user, char *x_msg)
                                         */
        struct savelist *sl = NULL;     /* list of rooms to save this page */
        struct savelist *sptr;
-       struct CtdlMessage *logmsg;
+       struct CtdlMessage *logmsg = NULL;
        long msgnum;
 
        if (strlen(x_msg) > 0) {
@@ -810,7 +813,7 @@ void cmd_reqt(char *argbuf) {
 
 
 
-char *serv_chat_init(void)
+CTDL_MODULE_INIT(chat)
 {
        CtdlRegisterProtoHook(cmd_chat, "CHAT", "Begin real-time chat");
        CtdlRegisterProtoHook(cmd_pexp, "PEXP", "Poll for instant messages");
@@ -821,6 +824,8 @@ char *serv_chat_init(void)
        CtdlRegisterSessionHook(cmd_gexp_async, EVT_ASYNC);
        CtdlRegisterSessionHook(delete_instant_messages, EVT_STOP);
        CtdlRegisterXmsgHook(send_instant_message, XMSG_PRI_LOCAL);
+
+       /* return our Subversion id for the Log */
        return "$Id$";
 }