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.

netbots extra components "Quality Of Serice"

Help for those learning Tcl or writing their own scripts.
Post Reply
j
jupiter
Voice
Posts: 1
Joined: Wed Mar 08, 2006 12:02 pm

netbots extra components "Quality Of Serice"

Post by jupiter »

Hello, here's my case,

I'm running a small botnet to experience how to share services between eggdrops; I have one hub (Dr0_0pY) , and one leaf (Sn0_0pY), and am trying to run services (a googler or wheaterscript for example).

I tried two solutions, loading them from scripts (eggdrop.conf) and from netbots (as component).

When running from scripts, both bots reply my requests.
When running from netbots, only the hub replies, but when the hub is down, the leaf does'nt react neither.

So now I'm trying to write a script, that would be performed on all bots, in order to determine the "active_bot" and to ensure non redundant services at any time (googler or meteo should be modified in accordance with some "if {botnick == active_bot} {...} else return 0"

I decided to perform this on join part, as bots are relatively stable, have vhosts and are on an unreal server which is secured.

Code: Select all

bind join - *!*@*jupi.botnet act_testjoin
bind part - *!*@*jupi.botnet act_testpart

# This is where i put the list of bots, I guess there is a command to pull it out, but didn't couldn't find it
set act_botlist [list Dr0_0pY Sn0_pY]

proc act_testpart {nick host hand chan msg} {
global act_botlist
foreach element $act_botlist {
if {[onchan $element $chan] == 1 } {set act_bot $element
putserv "PRIVMSG $chan : $nick is gone the active bot is $act_bot";break}
}
}

proc act_testjoin {nick host hand chan} {
global act_botlist
foreach element $act_botlist {
if {[onchan $element $chan] == 1 } {set act_bot $element
putserv "PRIVMSG $chan : $nick came back! the active bot is $act_bot";break}
}
}
The script runs now, but I have the problem that whatever bot leaves or join, I always have the msg "The active bot is Dr0_0pY". (That's what Sn0_0pY tells me even when Dr0_0pY leaves :evil: )

Does anyone have a hint?
Thank you :)
Post Reply