Here it is, the new thread interface.
[citadel.git] / citadel / modules / chat / serv_chat.c
index b62f48524c626538b712a09d7521e7291a20618e..c77b36ab902f7cc700d7ded0eb3d5c8fc866c7ba 100644 (file)
@@ -815,16 +815,19 @@ void cmd_reqt(char *argbuf) {
 
 CTDL_MODULE_INIT(chat)
 {
-       CtdlRegisterProtoHook(cmd_chat, "CHAT", "Begin real-time chat");
-       CtdlRegisterProtoHook(cmd_pexp, "PEXP", "Poll for instant messages");
-       CtdlRegisterProtoHook(cmd_gexp, "GEXP", "Get instant messages");
-       CtdlRegisterProtoHook(cmd_sexp, "SEXP", "Send an instant message");
-       CtdlRegisterProtoHook(cmd_dexp, "DEXP", "Disable instant messages");
-       CtdlRegisterProtoHook(cmd_reqt, "REQT", "Request client termination");
-       CtdlRegisterSessionHook(cmd_gexp_async, EVT_ASYNC);
-       CtdlRegisterSessionHook(delete_instant_messages, EVT_STOP);
-       CtdlRegisterXmsgHook(send_instant_message, XMSG_PRI_LOCAL);
-
+       if (!threading)
+       {
+               CtdlRegisterProtoHook(cmd_chat, "CHAT", "Begin real-time chat");
+               CtdlRegisterProtoHook(cmd_pexp, "PEXP", "Poll for instant messages");
+               CtdlRegisterProtoHook(cmd_gexp, "GEXP", "Get instant messages");
+               CtdlRegisterProtoHook(cmd_sexp, "SEXP", "Send an instant message");
+               CtdlRegisterProtoHook(cmd_dexp, "DEXP", "Disable instant messages");
+               CtdlRegisterProtoHook(cmd_reqt, "REQT", "Request client termination");
+               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$";
 }