This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Variables across botnet?

Old posts that have not been replied to for several years.
Locked
j
jedis

Post by jedis »

Code: Select all

proc do_msave {hand idx data} {
global botnick
putlog "[Faze.n] requesting a [u]mass save[u] on all bots (by $hand@$botnick)"
putallbots "asave"
utimer 1 save
return 1
}
proc bot_msave {hand idx data} {
global botnick
putlog "[Faze.n] requesting a [u]mass save[u] on all bots (by $hand@$botnick)"
utimer 1 save
return 1
}
Local bot: [Time!notice] requesting a mass save on all bots (by jedis@Bot1)

Remote bot: [Time!notice] requesting a mass save on all bots (by Bot1@Bot2)

How can I get the remote bot to display the proper person who executed the command?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

add it to your putallbots command, and display it in your remote callback
g
guppy
eggdrop engineer
Posts: 199
Joined: Mon Sep 24, 2001 8:00 pm
Location: Canada
Contact:

Post by guppy »

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
}

j
jedis

Post by jedis »

Thanks, got it working :smile:
j
jedis

Post by jedis »

guppy, using what you replied with above... why is this not working?

Code: Select all

##### 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 :sad:

Thanks.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

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]
Locked