]> code.citadel.org Git - citadel.git/blobdiff - citadel/room_ops.c
* Renamed "dynloader" to "serv_extensions" globally. We don't want people
[citadel.git] / citadel / room_ops.c
index aab6583e1cfdeb017138c4c7ed1214e4c1e72a6c..a2ef5da7bea1c9b81d0bd6ef6191706e8196c9eb 100644 (file)
@@ -31,7 +31,7 @@
 #include <errno.h>
 #include "citadel.h"
 #include "server.h"
-#include "dynloader.h"
+#include "serv_extensions.h"
 #include "database.h"
 #include "config.h"
 #include "room_ops.h"
@@ -806,19 +806,28 @@ void usergoto(char *where, int display_result, int transiently,
        if (retmsgs != NULL) *retmsgs = total_messages;
        if (retnew != NULL) *retnew = new_messages;
        lprintf(9, "<%s> %d new of %d total messages\n",
-               CC->quickroom.QRname, new_messages, total_messages);
+               CC->quickroom.QRname,
+               new_messages, total_messages
+       );
 
-       if (display_result)
-               cprintf("%d%c%s|%d|%d|%d|%d|%ld|%ld|%d|%d|%d|%d|%d\n",
+       if (display_result) {
+               cprintf("%d%c%s|%d|%d|%d|%d|%ld|%ld|%d|%d|%d|%d|%d|%d|\n",
                        CIT_OK, CtdlCheckExpress(),
                        truncated_roomname,
-                       new_messages, total_messages,
-                       info, CC->quickroom.QRflags,
-                       CC->quickroom.QRhighest,
-                       vbuf.v_lastseen,
-                       rmailflag, raideflag, newmailcount,
-                       CC->quickroom.QRfloor,
-                       vbuf.v_view);
+                       (int)new_messages,
+                       (int)total_messages,
+                       (int)info,
+                       (int)CC->quickroom.QRflags,
+                       (long)CC->quickroom.QRhighest,
+                       (long)vbuf.v_lastseen,
+                       (int)rmailflag,
+                       (int)raideflag,
+                       (int)newmailcount,
+                       (int)CC->quickroom.QRfloor,
+                       (int)vbuf.v_view,
+                       (int)CC->quickroom.QRdefaultview
+               );
+       }
 }
 
 
@@ -1072,6 +1081,7 @@ int CtdlRenameRoom(char *old_name, char *new_name, int new_floor) {
        struct floor *fl;
        struct floor flbuf;
        long owner = 0L;
+       char actual_old_name[SIZ];
 
        lprintf(9, "CtdlRenameRoom(%s, %s, %d)\n",
                old_name, new_name, new_floor);
@@ -1106,6 +1116,7 @@ int CtdlRenameRoom(char *old_name, char *new_name, int new_floor) {
 
        else {
                /* Rename it */
+               strcpy(actual_old_name, qrbuf.QRname);
                if (qrbuf.QRflags & QR_MAILBOX) {
                        owner = atol(qrbuf.QRname);
                }
@@ -1150,7 +1161,7 @@ int CtdlRenameRoom(char *old_name, char *new_name, int new_floor) {
                 * records, so we have to delete the old one.
                 */
                if (strcasecmp(new_name, old_name)) {
-                       b_deleteroom(old_name);
+                       b_deleteroom(actual_old_name);
                }
 
                ret = crr_ok;
@@ -1808,9 +1819,14 @@ void cmd_cflr(char *argbuf)
        extract(new_floor_name, argbuf, 0);
        cflr_ok = extract_int(argbuf, 1);
 
-
        if (CtdlAccessCheck(ac_aide)) return;
 
+       if (strlen(new_floor_name) == 0) {
+               cprintf("%d Blank floor name not allowed.\n",
+                       ERROR+ILLEGAL_VALUE);
+               return;
+       }
+
        for (a = 0; a < MAXFLOORS; ++a) {
                getfloor(&flbuf, a);