]> code.citadel.org Git - citadel.git/blobdiff - citadel/room_ops.c
TEXTCLIENT: getutline also belongs to the textclient. Tnx to Lightspeed for pointing...
[citadel.git] / citadel / room_ops.c
index 13ed6ef610ffaaff2eef16f6e965382b7e032b30..3f08b0105c27029ff44fab71af7cc84695196422 100644 (file)
@@ -1039,7 +1039,7 @@ void CtdlUserGoto(char *where, int display_result, int transiently,
        CCC->curr_view = (int)vbuf.v_view;
 
        if (display_result) {
-               cprintf("%d%c%s|%d|%d|%d|%d|%ld|%ld|%d|%d|%d|%d|%d|%d|%d|%d|\n",
+               cprintf("%d%c%s|%d|%d|%d|%d|%ld|%ld|%d|%d|%d|%d|%d|%d|%d|%d|%ld|\n",
                        CIT_OK, CtdlCheckExpress(),
                        truncated_roomname,
                        (int)new_messages,
@@ -1055,7 +1055,8 @@ void CtdlUserGoto(char *where, int display_result, int transiently,
                        (int)vbuf.v_view,
                        (int)CCC->room.QRdefaultview,
                        (int)is_trash,
-                       (int)CCC->room.QRflags2
+                       (int)CCC->room.QRflags2,
+                       (long)CCC->room.QRmtime
                );
        }
 }
@@ -2277,6 +2278,19 @@ void cmd_eflr(char *argbuf)
 }
 
 
+
+/* 
+ * cmd_stat()  -  return the modification time of the current room (maybe other things in the future)
+ */
+void cmd_stat(char *gargs)
+{
+       if (CtdlAccessCheck(ac_logged_in_or_guest)) return;
+       CtdlGetRoom(&CC->room, CC->room.QRname);
+       cprintf("%d %s|%ld|\n", CIT_OK, CC->room.QRname, CC->room.QRmtime);
+}
+
+
+
 /*****************************************************************************/
 /*                      MODULE INITIALIZATION STUFF                          */
 /*****************************************************************************/
@@ -2291,6 +2305,7 @@ CTDL_MODULE_INIT(room_ops)
                CtdlRegisterProtoHook(cmd_lzrm, "LZRM", "List zapped rooms");
                CtdlRegisterProtoHook(cmd_lprm, "LPRM", "List public rooms");
                CtdlRegisterProtoHook(cmd_goto, "GOTO", "Goto a named room");
+               CtdlRegisterProtoHook(cmd_stat, "STAT", "Get mtime of the current room");
                CtdlRegisterProtoHook(cmd_whok, "WHOK", "List users who know this room");
                CtdlRegisterProtoHook(cmd_rdir, "RDIR", "List files in room directory");
                CtdlRegisterProtoHook(cmd_getr, "GETR", "Get room parameters");