new server command 'stat' to return name and mtime of current room
authorArt Cancro <ajc@uncensored.citadel.org>
Wed, 4 Jul 2012 16:26:39 +0000 (12:26 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Wed, 4 Jul 2012 16:26:39 +0000 (12:26 -0400)
citadel/citadel.h
citadel/configure.ac
citadel/room_ops.c

index 9b0c36babb2e6cd039dbbb28ee33f041fc21ca47..0d18972200d745a0fec0b9bdd47faa567dee8dd0 100644 (file)
@@ -45,7 +45,7 @@ extern "C" {
  * usually more strict because you're not really supposed to dump/load and
  * upgrade at the same time.
  */
-#define REV_LEVEL      812             /* This version */
+#define REV_LEVEL      813             /* This version */
 #define REV_MIN                591             /* Oldest compatible database */
 #define EXPORT_REV_MIN 760             /* Oldest compatible export files */
 #define LIBCITADEL_MIN 812             /* Minimum required version of libcitadel */
index 7682cbb4024fb5665df49cf770dc06c25088640f..943a8457126c660a59878de6cf197153a6b59da2 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.52)
-AC_INIT([Citadel], [8.12], [http://www.citadel.org/])
+AC_INIT([Citadel], [8.13], [http://www.citadel.org/])
 AC_REVISION([$Revision: 5108 $])
 AC_CONFIG_SRCDIR([citserver.c])
 AC_CONFIG_HEADER(sysdep.h)
index 4fb1501cdf66f3ec77345144146f61a4dddd7ee6..3f08b0105c27029ff44fab71af7cc84695196422 100644 (file)
@@ -2278,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                          */
 /*****************************************************************************/
@@ -2292,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");