proc do_msave {hand idx data} {
global botnick
putlog "[Faze.n] requesting a mass save on all bots (by $hand@$botnick)"
putallbots "asave $hand"
utimer 1 save
return 1
}
proc bot_msave {bot idx data} {
if {[scan $data "%s" hand] != 1} {
set hand "unknown"
}
putlog "[Faze.n] requesting a mass save on all bots (by $hand@$bot)"
utimer 1 save
return 1
}
##### mass distro
bind dcc n mdistro do_mdistro
bind bot - adistro bot_mdistro
proc do_mdistro {hand idx arg} {
global botnick
putlog "[Faze.m] [b]tcl distro[b] - forcing all bots to update their tcl (by $hand@botnick)"
putallbots "adistro $hand"
utimer 1 distro
return 1
}
proc bot_mdistro {bot idx data} {
if {[scan $data "%s" hand] != 1} {
set hand "unknown"
}
putlog "[Faze.m] [b]tcl distro[b] - forcing all bots to update their tcl (by $hand@bot)"
utimer 1 distro
return 1
}
My distro bind is:
bind dcc n distro dcc_distro
To start the normal distro on the bot, I type 'distro'. The above code you suggested worked to make my 'msave, mrestart, and mrehash' commands work. Why is it not working for the 'mdistro' command?
Previous help I had on this subject were on the old forums, and I could still not get it working
at a guess, you're not calling your distro command with enough args (i'm guessing its declaired as proc distro {hand idx arg}. try passing the needed requirements to the proc, eg
timer 1 [list distro $hand $idx $arg]