{ "OSMSG_ALERT_IS", "$b%-20s$b %-6s (by %s)" },
{ "OSMSG_ALERT_END", "----------------End of Alerts-----------------" },
/* routing messages */
- { "OSMSG_ROUTINGPLAN_LIST", "$bRouting Plans$b" },
+ { "OSMSG_ROUTINGPLAN", "$bRouting Plan(s)$b" },
+ { "OSMSG_ROUTINGPLAN_LIST_HEAD", "$bRouting Plans$b" },
{ "OSMSG_ROUTINGPLAN_BAR", "----------------------------------------------" },
- { "OSMSG_ROUTINGPLAN_END", "-------------End of Routing Plans-------------" },
+ { "OSMSG_ROUTINGPLAN_END", "------------End of Routing Plan(s)------------" },
{ "OSMSG_ROUTINGPLAN_OPTION", "%s is set to %s" },
{ "OSMSG_ROUTINGPLAN_ACTIVE", "Auto routing is active, using plan '%s'." },
{ "OSMSG_ROUTING_ACTIVATION_ERROR", "There was an error activating the routing plan. Check for loops, and make sure the map includes my own uplink." },
{ "OSMSG_ROUTINGPLAN_OPTION_NOT_FOUND", "There is no routing plan option '%s'." },
{ "OSMSG_ROUTINGPLAN_OPTION_NOT_SET", "Option '%s' is not currently set." },
{ "OSMSG_ROUTINGPLAN_NAME", "$b%s:$b" },
+ { "OSMSG_ROUTINGPLAN_LIST", "$b%s$b" },
{ "OSMSG_ROUTINGPLAN_SERVER"," %s:%d <-- %s[%d/%s] (%s)" },
{ "OSMSG_ADDPLAN_SUCCESS", "Added new routing plan '%s'." },
{ "OSMSG_ADDPLAN_FAILED", "Could not add new plan '%s' (does it already exist?)." },
dict_iterator_t rpit;
dict_iterator_t it;
struct routingPlan *rp;
- reply("OSMSG_ROUTINGPLAN_LIST");
- reply("OSMSG_ROUTINGPLAN_BAR");
- for(rpit = dict_first(opserv_routing_plans); rpit; rpit = iter_next(rpit)) {
- const char* name = iter_key(rpit);
- rp = iter_data(rpit);
- reply("OSMSG_ROUTINGPLAN_NAME", name);
- for(it = dict_first(rp->servers); it; it = iter_next(it)) {
- const char* servername = iter_key(it);
- struct routingPlanServer *rps = iter_data(it);
- reply("OSMSG_ROUTINGPLAN_SERVER", servername, rps->port, rps->uplink, rps->karma, rps->offline? "offline" : "online", rps->secondaryuplink ? rps->secondaryuplink : "None");
- }
+ if(argc > 1) {
+ reply("OSMSG_ROUTINGPLAN");
+ reply("OSMSG_ROUTINGPLAN_BAR");
+ for(rpit = dict_first(opserv_routing_plans); rpit; rpit = iter_next(rpit)) {
+ const char* name = iter_key(rpit);
+ rp = iter_data(rpit);
+ if(match_ircglob(name, argv[1])) {
+ reply("OSMSG_ROUTINGPLAN_NAME", name);
+ for(it = dict_first(rp->servers); it; it = iter_next(it)) {
+ const char* servername = iter_key(it);
+ struct routingPlanServer *rps = iter_data(it);
+ reply("OSMSG_ROUTINGPLAN_SERVER", servername, rps->port, rps->uplink, rps->karma, rps->offline? "offline" : "online", rps->secondaryuplink ? rps->secondaryuplink : "None");
+ }
+ }
+ }
+ reply("OSMSG_ROUTINGPLAN_END");
+ }
+ else {
+ reply("OSMSG_ROUTINGPLAN_LIST_HEAD");
+ reply("OSMSG_ROUTINGPLAN_BAR");
+ for(rpit = dict_first(opserv_routing_plans); rpit; rpit = iter_next(rpit)) {
+ const char* name = iter_key(rpit);
+ reply("OSMSG_ROUTINGPLAN_LIST", name);
+ }
+ reply("OSMSG_ROUTINGPLAN_END");
+ route_show_options(cmd, user);
}
- reply("OSMSG_ROUTINGPLAN_END");
- route_show_options(cmd, user);
return 1;
}
" $bROUTING MAP$b Show what the active routing plan says the network should look like.",
" $bREROUTE$b Connect servers to the network, optionally squiting them first to change the routing.",
" $b$b ",
- " Start by creating a routing plan, and then adding servers to it, with their listning port, uplink, and a backup uplink. You can view it in $bSTATS ROUTING$b. Take care not to create loops, and that you make everything connected. Then set your new plan ACTIVE using $bROUTING SET$b. $O does the rest! See help topic $bROUTING EXAMPLE$b for a working example."
+ " Start by creating a routing plan, and then adding servers to it, with their listning port, uplink, and a backup uplink. You can view it in $bSTATS ROUTING planname$b. Take care not to create loops, and that you make everything connected. Then set your new plan ACTIVE using $bROUTING SET$b. $O does the rest! See help topic $bROUTING EXAMPLE$b for a working example."
);
"CHANNEL" (
"ROUTING ADDPLAN" ("/msg $O ROUTING ADDPLAN <name>",
"Creates a new blank routing plan named name.",
"You can then use $bROUTING ADDSERVER$b to build it.",
- "Use $bSTATS ROUTING$b to view it, and $bROUTING SET ACTIVE$b to activate it.",
+ "Use $bSTATS ROUTING [name]$b to view it, and $bROUTING SET ACTIVE$b to activate it.",
"$uSee Also:$u routing, stats routing, routing delplan, routing set, routing addserver"
);
"ROUTING DELPLAN" ("/msg $O ROUTING DELPLAN <name>",
"$uSee also:$u routing, routing map, stats routing",
);
-"STATS ROUTING" ("/msg $O STATS ROUTING",
+"STATS ROUTING" ("/msg $O STATS ROUTING [planmask]",
"Provides information about The Auto Routing System's configuration. You can see the routing plans, and the current routing options.",
+ " If planmask is provided, you will see the full details for any plans matching the mask (* and ? wildcards)",
"$uSee also:$u routing, routing set",
);