<?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/9502" />

	<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>2005-04-30T10:46:38-04:00</updated>

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

		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2005-04-30T10:46:38-04:00</updated>

		<published>2005-04-30T10:46:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48774#p48774</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48774#p48774"/>
		<title type="html"><![CDATA[Need help with anti ban/deop script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48774#p48774"><![CDATA[
using channel get &lt;channel&gt; &lt;flag&gt; seems smarter to use than lsearch though<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Sat Apr 30, 2005 10:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-04-28T11:44:34-04:00</updated>

		<published>2005-04-28T11:44:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48665#p48665</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48665#p48665"/>
		<title type="html"><![CDATA[Need help with anti ban/deop script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48665#p48665"><![CDATA[
I just skimmed through your code, if I'm not wrong you're relaying on utimer to do the deop, but what if the bot didn't get ops during this period of time ?<br><br>My suggestion is to add the nick to an array so once the bot regains op, it checks if info exists for the array and does the commands.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Apr 28, 2005 11:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-04-28T11:52:05-04:00</updated>

		<published>2005-04-28T11:42:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48664#p48664</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48664#p48664"/>
		<title type="html"><![CDATA[Need help with anti ban/deop script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48664#p48664"><![CDATA[
<blockquote class="uncited"><div>if {($mode == "+b") &amp;&amp; ($arg == $botnick) &amp;&amp; ($nick != "*.quakenet.org")}</div></blockquote>this contains 2 logical and 1 syntactical errors:<br>1st: $arg will never be $botnick, even if someone bans the bot by nick it will be 'botnick!*@* != botnick'.<br>2nd: $nick will never be *.quakenet.org (besides == string comparsions are not using wildcards anyway), if it is a server mode $nick will an emtpy string and $uhost will contain something like "blueyonder2.uk.quakenet.org" and match "*.quakenet.org", but it still will never be equal to "*.quakenet.org" ^-^<br>3rd: the open quote after if MUST be in the same line than if itself (you dont have a command end character like in C, php, etc.)<br><br>overall suggestions:<br>1st: trash your foreach structure and the [string match "+banpunish" $i] thing and use this for check:<div class="codebox"><p>Code: </p><pre><code>if { [lsearch -exact [channel info $chan] "+banpunish"] != -1 } {   ...}</code></pre></div>2nd: dont use UNBANALL, this will only unball all previos banned offenders as well. use INVITE instead (you spare the JOIN command, since the bot will follow the invite automatically). many overtakes ban, set invite + key and maybe even +l, but INVITE will own all <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=2382">De Kus</a> — Thu Apr 28, 2005 11:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dizzle]]></name></author>
		<updated>2005-04-28T11:29:33-04:00</updated>

		<published>2005-04-28T11:29:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48663#p48663</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48663#p48663"/>
		<title type="html"><![CDATA[Need help with anti ban/deop script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48663#p48663"><![CDATA[
Hi, im learning how too script on my own, and i was making this script, butt it aint working, <br><br>the bot is rejoining the channel, butt he aint banning the user who did it, hes just rejoining, can somebody give me some advice what too do ? <br><br>here's the script <br><div class="codebox"><p>Code: </p><pre><code>set globalbantime "120"set banmsg "Dont ban me dude, 120 minutes banned set kickmsg "[censored] off"setudef flag banpunishsetudef flag banprotbind mode - * check_modesproc check_modes {nick uhost hand chan mode arg} {   global botnick kickmsg globalbantime   foreach i [channel info $chan] {      if {([onchan L $chan])} {         if {([string match "+banpunish" $i])} {            if {($mode == "-o") &amp;&amp; ($arg == $botnick) &amp;&amp; ($nick != "*.quakenet.org")} {               putserv "PRIVMSG L :unbanall $chan"               puthelp "JOIN $chan"               putserv "PRIVMSG L :op $chan"               utimer 3 [list putserv "MODE $chan -o $nick"]               utimer 5 [list putserv "MODE $chan +b $nick *!$uhost"]               utimer 7 [list putserv "KICK $chan $nick :$banmsg"]               timer $globalbantime [subst {putserv "MODE $chan -b *!$uhost"}]            } else {               if {($mode == "+b") &amp;&amp; ($arg == $botnick) &amp;&amp; ($nick != "*.quakenet.org")} {                  putserv "PRIVMSG L :unbanall $chan"                  puthelp "JOIN $chan"                  putserv "PRIVMSG L :op $chan"                  utimer 3 [list putserv "MODE $chan -o $nick"]                  utimer 5 [list putserv "MODE $chan +b $nick *!$uhost"]                  utimer 7 [list putserv "KICK $chan $nick :$banmsg"]                  timer $globalbantime [subst {putserv "MODE $chan -b *!$uhost"}]               }            }         } else {            if {([string match "+banprot" $i])} {               if {($mode == "-o") &amp;&amp; ($arg == $botnick) &amp;&amp; ($nick != "*.quakenet.org")} {                  putserv "PRIVMSG L :unbanall $chan"                  puthelp "JOIN $chan"                  putserv "PRIVMSG L :op $chan"                  utimer 3 [list putserv "MODE $chan -o $nick"]                  utimer 5 [list putserv "KICK $chan $nick :$banmsg"]                  timer $globalbantime [subst {putserv "MODE $chan -b *!$uhost"}]               } else {                  if {($mode == "+b") &amp;&amp; ($arg == $botnick) &amp;&amp; ($nick != "*.quakenet.org")} {                     putserv "PRIVMSG L :unbanall $chan"                     puthelp "JOIN $chan"                     putserv "PRIVMSG L :op $chan"                     utimer 3 [list putserv "MODE $chan -o $nick"]                     utimer 5 [list putserv "KICK $chan $nick :$banmsg"]                     timer $globalbantime [subst {putserv "MODE $chan -b *!$uhost"}]                  }               }            }         }      } else {         if {([onchan Q $chan])} {            if {([string match "+banpunish" $i])} {               if {($mode == "-o") &amp;&amp; ($arg == $botnick) &amp;&amp; ($nick != "*.quakenet.org")} {                  putserv "PRIVMSG Q :unban $bothost"                  puthelp "JOIN $chan"                  putserv "PRIVMSG Q :op $chan"                  utimer 3 [list putserv "MODE $chan -o $nick"]                  utimer 5 [list putserv "MODE $chan +b $nick *!$uhost"]                  utimer 7 [list putserv "KICK $chan $nick :$banmsg"]                  timer $globalbantime [subst {putserv "MODE $chan -b *!$uhost"}]               } else {                  if {($mode == "+b") &amp;&amp; ($arg == $botnick) &amp;&amp; ($nick != "*.quakenet.org")} {                     putserv "PRIVMSG Q :unban $bothost"                     puthelp "JOIN $chan"                     putserv "PRIVMSG Q :op $chan"                     utimer 3 [list putserv "MODE $chan -o $nick"]                     utimer 5 [list putserv "MODE $chan +b $nick *!$uhost"]                     utimer 7 [list putserv "KICK $chan $nick :$banmsg"]                     timer $globalbantime [subst {putserv "MODE $chan -b *!$uhost"}]                  }               }            } else {               if {([string match "+banprot" $i])} {                  if {($mode == "-o") &amp;&amp; ($arg == $botnick) &amp;&amp; ($nick != "*.quakenet.org")} {                     putserv "PRIVMSG Q :unban $bothost"                     puthelp "JOIN $chan"                     putserv "PRIVMSG Q :op $chan"                     utimer 3 [list putserv "MODE $chan -o $nick"]                     utimer 5 [list putserv "KICK $chan $nick :$banmsg"]                     timer $globalbantime [subst {putserv "MODE $chan -b *!$uhost"}]                  } else {                     if {($mode == "+b") &amp;&amp; ($arg == $botnick) &amp;&amp; ($nick != "*.quakenet.org")} {                        putserv "PRIVMSG Q :unban $bothost"                        puthelp "JOIN $chan"                        putserv "PRIVMSG Q :op $chan"                        utimer 3 [list putserv "MODE $chan -o $nick"]                        utimer 5 [list putserv "KICK $chan $nick :$banmsg"]                        timer $globalbantime [subst {putserv "MODE $chan -b *!$uhost"}]                     }                  }               }            }         }      }   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6156">Dizzle</a> — Thu Apr 28, 2005 11:29 am</p><hr />
]]></content>
	</entry>
	</feed>
