cleaned a few things up in messages.c ... geez this is such old code
[citadel.git] / citadel / modules / mrtg / serv_mrtg.c
index 8eb9c53fdfe39faa1569da14dc1cf05fd80c4191..0402461db3ef08998cbc5b2b0ababa947e15ae73 100644 (file)
@@ -1,12 +1,19 @@
 /*
- * $Id$
- *
  * This module supplies statistics about the activity levels of your Citadel
  * system.  We didn't bother writing a reporting module, because there is
  * already an excellent tool called MRTG (Multi Router Traffic Grapher) which
  * is available at http://www.mrtg.org that can fetch data using external
  * scripts.  This module supplies data in the format expected by MRTG.
  *
+ * 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"
@@ -40,9 +47,7 @@
 #include "support.h"
 #include "config.h"
 #include "control.h"
-#include "room_ops.h"
 #include "user_ops.h"
-#include "policy.h"
 #include "database.h"
 #include "msgbase.h"
 
@@ -67,7 +72,7 @@ void mrtg_output(long value1, long value2) {
        cprintf("%ld\n", value2);
        cprintf("%d days, %d hours, %d minutes\n",
                uptime_days, uptime_hours, uptime_minutes);
-       cprintf("%s\n", config.c_humannode);
+       cprintf("%s\n", CtdlGetConfigStr("c_humannode"));
        cprintf("000\n");
 }
 
@@ -105,7 +110,7 @@ void mrtg_users(void) {
  * Volume of messages submitted
  */
 void mrtg_messages(void) {
-       mrtg_output(CitControl.MMhighest, 0L);
+       mrtg_output(CtdlGetConfigLong("MMhighest"), 0);
 }
 
 
@@ -170,6 +175,6 @@ CTDL_MODULE_INIT(mrtg)
                CtdlRegisterProtoHook(cmd_mrtg, "MRTG", "Supply stats to MRTG");
        }
        
-       /* return our Subversion id for the Log */
-        return "$Id$";
+       /* return our module name for the log */
+        return "mrtg";
 }