]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_mrtg.c
* extract_token() now expects to be supplied with the size of the
[citadel.git] / citadel / serv_mrtg.c
index 433039d824ec3b347c51ef124a01ece2667d31b5..a28896cb1cc045c07f36751904624e3534616f1b 100644 (file)
@@ -40,7 +40,7 @@
 #include "support.h"
 #include "config.h"
 #include "control.h"
-#include "dynloader.h"
+#include "serv_extensions.h"
 #include "room_ops.h"
 #include "user_ops.h"
 #include "policy.h"
@@ -110,9 +110,9 @@ void mrtg_messages(void) {
  * Fetch data for MRTG
  */
 void cmd_mrtg(char *argbuf) {
-       char which[SIZ];
+       char which[32];
 
-       extract(which, argbuf, 0);
+       extract_token(which, argbuf, 0, '|', sizeof which);
 
        if (!strcasecmp(which, "users")) {
                mrtg_users();
@@ -122,7 +122,7 @@ void cmd_mrtg(char *argbuf) {
        }
        else {
                cprintf("%d Unrecognized keyword '%s'\n",
-                       ERROR+ILLEGAL_VALUE, which);
+                       ERROR + ILLEGAL_VALUE, which);
        }
 }