svn: 2276
@@ -32,6 +32,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
* Fixed cmd_net[ps|last] not working. (#130, #131)
* Added note at end of display for cmd_match to try using cmd_matchbot
* Fixed 'reset*' being blocked with 'botcmd *'
+* Added code to prevent cmd_botcmd from being chained over botnet.
1.2.4
* Fixed cmd_botset not displaying botnick.
@@ -251,6 +251,8 @@ See also: -ban, +ban, console%{+m|m}, chanset, chaninfo%{-}, stick, unstick
Just using '?' for 'bot' will choose a random leaf bot.
Just using '&' for 'bot' will do the cmd on all localhub bots. (first bot in config).
+
+ This cmd cannot be chained over the botnet, ie, no: .botcmd [bot] botcmd [bot2] ...
See also: bc, cmdpass
::botjoin
@@ -1245,6 +1245,12 @@ static void cmd_chsecpass(int idx, char *par)
static void cmd_botcmd(int idx, char *par)
{
+ if (dcc[idx].simul >= 0) {
+ dprintf(idx, "Sorry, you can't chain '%sbotcmd'.\n", settings.dcc_prefix);
+ putlog(LOG_WARN, "*", "%s attempted to chain 'botcmd' over the botnet.");
+ return;
+ }
char *botm = newsplit(&par), *cmd = NULL;
bool rand_leaf = 0, all_localhub = 0;