]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/ctdlproto/serv_file.c
Merge branch 'configdb' of ssh://git.citadel.org/appl/gitroot/citadel
[citadel.git] / citadel / modules / ctdlproto / serv_file.c
index 162c13c3038f82e70d5e1d0ce7d4e66bc745d4e0..50661c7c75d64187e97edcdbef00a4d88fcc4bce 100644 (file)
@@ -1,48 +1,28 @@
 /* 
  * Server functions which handle file transfers and room directories.
+ *
+ * Copyright (c) 1987-2015 by the citadel.org team
+ *
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  */
 
-#include "sysdep.h"
-#include <stdlib.h>
-#include <unistd.h>
 #include <stdio.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <ctype.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
-#include <dirent.h>
-#include <limits.h>
 #include <libcitadel.h>
-#include "citadel.h"
-#include "server.h"
-#include "config.h"
-#include "files.h"
-#include "sysdep_decls.h"
-#include "support.h"
-#include "room_ops.h"
-#include "msgbase.h"
-#include "citserver.h"
-#include "threads.h"
+#include <dirent.h>
+
 #include "ctdl_module.h"
+#include "citserver.h"
+#include "support.h"
+#include "config.h"
 #include "user_ops.h"
 
 
-
 /*
  * Server command to delete a file from a room's directory
  */
@@ -819,16 +799,15 @@ void do_help_subst(char *buffer)
 {
        char buf2[16];
 
-       help_subst(buffer, "^nodename", config.c_nodename);
-       help_subst(buffer, "^humannode", config.c_humannode);
-       help_subst(buffer, "^fqdn", config.c_fqdn);
+       help_subst(buffer, "^nodename", CtdlGetConfigStr("c_nodename"));
+       help_subst(buffer, "^humannode", CtdlGetConfigStr("c_humannode"));
+       help_subst(buffer, "^fqdn", CtdlGetConfigStr("c_fqdn"));
        help_subst(buffer, "^username", CC->user.fullname);
        snprintf(buf2, sizeof buf2, "%ld", CC->user.usernum);
        help_subst(buffer, "^usernum", buf2);
-       help_subst(buffer, "^sysadm", config.c_sysadm);
+       help_subst(buffer, "^sysadm", CtdlGetConfigStr("c_sysadm"));
        help_subst(buffer, "^variantname", CITADEL);
-       snprintf(buf2, sizeof buf2, "%d", config.c_maxsessions);
-       help_subst(buffer, "^maxsessions", buf2);
+       help_subst(buffer, "^maxsessions", CtdlGetConfigStr("c_maxsessions"));          // yes it's numeric but str is ok here
        help_subst(buffer, "^bbsdir", ctdl_message_dir);
 }