]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/opserv.c
Synchronization with srvx--devo--1.3--patch-19. Fixes raw/dump bug (it was stripping...
[irc/evilnet/x3.git] / src / opserv.c
index aafd6df23a7234e16c4be429f96369af90ce3fbc..08c180c8870a104bb482f1c720517eb7565402c8 100644 (file)
@@ -1,7 +1,7 @@
 /* opserv.c - IRC Operator assistance service
  * Copyright 2000-2004 srvx Development Team
  *
- * This file is part of srvx.
+ * This file is part of x3.
  *
  * srvx is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -1705,7 +1705,7 @@ static MODCMD_FUNC(cmd_stats_warn) {
     return 1;
 }
 
-#if defined(WITH_MALLOC_SRVX)
+#if defined(WITH_MALLOC_X3)
 static MODCMD_FUNC(cmd_stats_memory) {
     extern unsigned long alloc_count, alloc_size;
     send_message_type(MSG_TYPE_NOXLATE, user, cmd->parent->bot,
@@ -1729,9 +1729,9 @@ static MODCMD_FUNC(cmd_stats_memory) {
 
 static MODCMD_FUNC(cmd_dump)
 {
-    char linedup[MAXLEN], *original;
+    char linedup[MAXLEN], original[MAXLEN];
 
-    original = unsplit_string(argv+1, argc-1, NULL);
+    unsplit_string(argv+1, argc-1, original);
     safestrncpy(linedup, original, sizeof(linedup));
     /* assume it's only valid IRC if we can parse it */
     if (parse_line(linedup, 1)) {
@@ -1744,9 +1744,9 @@ static MODCMD_FUNC(cmd_dump)
 
 static MODCMD_FUNC(cmd_raw)
 {
-    char linedup[MAXLEN], *original;
+    char linedup[MAXLEN], original[MAXLEN];
 
-    original = unsplit_string(argv+1, argc-1, NULL);
+    unsplit_string(argv+1, argc-1, original);
     safestrncpy(linedup, original, sizeof(linedup));
     /* Try to parse the line before sending it; if it's too wrong,
      * maybe it will core us instead of our uplink. */
@@ -4278,7 +4278,7 @@ init_opserv(const char *nick)
     opserv_define_func("STATS UPLINK", cmd_stats_uplink, 0, 0, 0);
     opserv_define_func("STATS UPTIME", cmd_stats_uptime, 0, 0, 0);
     opserv_define_func("STATS WARN", cmd_stats_warn, 0, 0, 0);
-#if defined(WITH_MALLOC_SRVX) || defined(WITH_MALLOC_SLAB)
+#if defined(WITH_MALLOC_X3) || defined(WITH_MALLOC_SLAB)
     opserv_define_func("STATS MEMORY", cmd_stats_memory, 0, 0, 0);
 #endif
     opserv_define_func("TRACE", cmd_trace, 100, 0, 3);