<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/11484" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2006-03-08T12:57:51-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/11484</id>

		<entry>
		<author><name><![CDATA[jupiter]]></name></author>
		<updated>2006-03-08T12:57:51-04:00</updated>

		<published>2006-03-08T12:57:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60943#p60943</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60943#p60943"/>
		<title type="html"><![CDATA[netbots extra components &quot;Quality Of Serice&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60943#p60943"><![CDATA[
Hello, here's my case,<br><br>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).<br><br>I tried two solutions, loading them from scripts (eggdrop.conf) and from netbots (as component).<br><br>When running from scripts, both bots reply my requests.<br>When running from netbots, only the hub replies, but when the hub is down, the leaf does'nt react neither.<br><br>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"<br><br>I decided to perform this on join part, as bots are relatively stable, have vhosts and are on an unreal server which is secured.<br><div class="codebox"><p>Code: </p><pre><code>bind join - *!*@*jupi.botnet act_testjoinbind 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 itset act_botlist [list Dr0_0pY Sn0_pY]proc act_testpart {nick host hand chan msg} {global act_botlistforeach element $act_botlist {if {[onchan $element $chan] == 1 } {set act_bot $elementputserv "PRIVMSG $chan : $nick is gone the active bot is $act_bot";break}}}proc act_testjoin {nick host hand chan} {global act_botlistforeach element $act_botlist {if {[onchan $element $chan] == 1 } {set act_bot $elementputserv "PRIVMSG $chan : $nick came back! the active bot is $act_bot";break}}}</code></pre></div>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  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title="Evil or Very Mad"> )<br><br>Does anyone have a hint?<br>Thank you <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7465">jupiter</a> — Wed Mar 08, 2006 12:57 pm</p><hr />
]]></content>
	</entry>
	</feed>
