]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_chat.c
* Renamed "dynloader" to "serv_extensions" globally. We don't want people
[citadel.git] / citadel / serv_chat.c
index ceec50f6e0fd68728bbeae13614bad66c858f680..9d005dfe94dc681e70cceb4a2a76f8c7e7f25106 100644 (file)
@@ -31,7 +31,7 @@
 #include <limits.h>
 #include "citadel.h"
 #include "server.h"
-#include "dynloader.h"
+#include "serv_extensions.h"
 #include <syslog.h>
 #include "serv_chat.h"
 #include "sysdep_decls.h"
@@ -586,12 +586,12 @@ int send_express_message(char *lun, char *x_user, char *x_msg)
                /* Save a copy of the message in the sender's log room,
                 * creating the room if necessary.
                 */
-               create_room(PAGELOGROOM, 4, "", 0, 1);
+               create_room(PAGELOGROOM, 4, "", 0, 1, 0);
                msgnum = CtdlSubmitMsg(logmsg, NULL, PAGELOGROOM);
 
                /* Now save a copy in the global log room, if configured */
                if (strlen(config.c_logpages) > 0) {
-                       create_room(config.c_logpages, 3, "", 0, 1);
+                       create_room(config.c_logpages, 3, "", 0, 1, 1);
                        CtdlSaveMsgPointerInRoom(config.c_logpages, msgnum, 0);
                }
 
@@ -601,7 +601,7 @@ int send_express_message(char *lun, char *x_user, char *x_msg)
                 * but we've already supplied the namespace prefix.
                 */
                while (sl != NULL) {
-                       create_room(sl->roomname, 5, "", 0, 1);
+                       create_room(sl->roomname, 5, "", 0, 1, 1);
                        CtdlSaveMsgPointerInRoom(sl->roomname, msgnum, 0);
                        sptr = sl->next;
                        phree(sl);
@@ -677,9 +677,9 @@ void cmd_sexp(char *argbuf)
 
                if (message_sent > 0) {
                        if (strlen(x_msg) > 0)
-                               cprintf("%d Message sent", OK);
+                               cprintf("%d Message sent", CIT_OK);
                        else
-                               cprintf("%d Ok to send message", OK);
+                               cprintf("%d Ok to send message", CIT_OK);
                        if (message_sent > 1)
                                cprintf(" to %d users", message_sent);
                        cprintf(".\n");
@@ -702,18 +702,16 @@ void cmd_dexp(char *argbuf)
 {
        int new_state;
 
-       if (!CC->logged_in) {
-               cprintf("%d Not logged in.\n",ERROR+NOT_LOGGED_IN);
-               return;
-               }
+       if (CtdlAccessCheck(ac_logged_in)) return;
 
        new_state = extract_int(argbuf, 0);
        if ((new_state == 0) || (new_state == 1)) {
                CC->disable_exp = new_state;
-               }
-       cprintf("%d %d\n", OK, CC->disable_exp);
        }
 
+       cprintf("%d %d\n", CIT_OK, CC->disable_exp);
+}
+
 
 /*
  * Request client termination
@@ -747,12 +745,12 @@ void cmd_reqt(char *argbuf) {
                }
        }
        end_critical_section(S_SESSION_TABLE);
-       cprintf("%d Sent termination request to %d sessions.\n", OK, sessions);
+       cprintf("%d Sent termination request to %d sessions.\n", CIT_OK, sessions);
 }
 
 
 
-char *Dynamic_Module_Init(void)
+char *serv_inithat_init(void)
 {
        CtdlRegisterProtoHook(cmd_chat, "CHAT", "Begin real-time chat");
        CtdlRegisterProtoHook(cmd_pexp, "PEXP", "Poll for express messages");