]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/opserv.c
exit if no memoserv nick is set
[irc/evilnet/x3.git] / src / opserv.c
index 3481b48c50d5ded90e0a332051939615b5190b33..6ef304045e0ff1e6392081cc79e8b8114971a644 100644 (file)
@@ -30,7 +30,7 @@
 #include "saxdb.h"
 #include "shun.h"
 
-#include <regex.h>
+#include <tre/regex.h>
 
 #ifdef HAVE_SYS_TIMES_H
 #include <sys/times.h>
@@ -288,7 +288,7 @@ static const struct message_entry msgtab[] = {
     { "OSMSG_ROUTINGPLAN_NAME",  "$b%s:$b" },
     { "OSMSG_ROUTINGPLAN_SERVER","      %s:%d <-- %s[%d/%s] (%s)" }, 
     { "OSMSG_ADDPLAN_SUCCESS", "Added new routing plan '%s'." },
-    { "OSMSG_ADDPLAN_FAILURE", "Could not add new plan '%s' (does it already exist?)." },
+    { "OSMSG_ADDPLAN_FAILED", "Could not add new plan '%s' (does it already exist?)." },
     { "OSMSG_INVALID_PLAN", "That routing plan name is not valid." },
     { "OSMSG_PLAN_DELETED", "The routing plan was sucessfully deleted." },
     { "OSMSG_PLAN_NOT_FOUND", "There is no routing plan called '%s'." },
@@ -308,6 +308,7 @@ static const struct message_entry msgtab[] = {
     { "OSMSG_COULDNT_FIND_SERVER",  "Couldnt find %s, so using %s to link %s" },
     { "OSMSG_INSPECTING_SERVER",    "Inspecting server [%s]" },
     { "OSMSG_REROUTING_ACC_MAP",    "Rerouting network according to loaded map.." },
+    { "OSMSG_REROUTING_NOTCONFIGURED", "You have not configured routing. See $/msg $O help routing$b." },
     { "OSMSG_CONNECTING_MISSING_ONLY", "Connecting missing servers only.." },
     { "OSMSG_NO_ROUTING_NECESSARY", "No rerouting appears necessary." },
     { "OSMSG_TESTING_REROUTE",      "Testing Reroute(): Commands not sent to socket.." },
@@ -2811,6 +2812,10 @@ int reroute(struct route *route, struct userNode *user, struct svccmd *cmd, char
     int connect = 0, move = 0, missing = 0, i;
     char d = toupper(*directive);
 
+    if(!route || !route->servers) {
+        reply("OSMSG_REROUTING_NOTCONFIGURED");
+        return 0;
+    }
     if(user) {
         if(d == 'N') { /* normal */
             irc_wallops("%s", "Attempting a reroute of the network according to loaded map...");