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

	<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-09-30T13:01:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Azeem]]></name></author>
		<updated>2006-09-30T13:01:07-04:00</updated>

		<published>2006-09-30T13:01:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66807#p66807</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66807#p66807"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66807#p66807"><![CDATA[
Thanks for Helping <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=8235">Azeem</a> — Sat Sep 30, 2006 1:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2006-09-30T12:00:54-04:00</updated>

		<published>2006-09-30T12:00:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66798#p66798</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66798#p66798"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66798#p66798"><![CDATA[
@Azeem:<br>If you're referring to the use of list-commands; Make sure it's a list and not a string. If nessecary, convert the string to a list.<br>You'll probably want to read up on these commands:<br>list, split, join, lappend, lindex, lrange (and a few other list-commands)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Sep 30, 2006 12:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Azeem]]></name></author>
		<updated>2006-09-30T11:11:20-04:00</updated>

		<published>2006-09-30T11:11:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66796#p66796</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66796#p66796"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66796#p66796"><![CDATA[
Ohk..thanks for highlighting b/w do u know any solution to it..am a n00b in tcl .. <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=8235">Azeem</a> — Sat Sep 30, 2006 11:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-09-30T02:01:08-04:00</updated>

		<published>2006-09-30T02:01:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66792#p66792</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66792#p66792"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66792#p66792"><![CDATA[
Why would you use " " around <ul><li>?<br><br>You need to start writing cleaner code tosser.<br><div class="codebox"><p>Code: </p><pre><code>set badcomm(chans) [list #Fuzzy #ForestHaven]set badcomm(comms) [list !find @find !list @list !packs @packs !search @search !warezlist @warezlist !xdcclist @xdcclist]bind pubm -|- "% !*" pub:badcommandsbind pubm -|- "% @*" pub:badcommandsproc pub:badcommands {nickname hostname handle channel text} {  global badcomm  if {[lsearch -exact [string tolower $badcomm(chans)] [string tolower $channel]] &gt;= 0} {    set command [lindex [split $text] 0]    if {[lsearch -exact [string tolower $badcomm(comms)] [string tolower $command]] &gt;= 0} {      putserv "KICK $channel $nickname :The command you just entered '$command' is not allowed here due to it being commonly used by art and software pirates to find out whether or not a server hosts file archieves. Continuing to enter it will result in you being banned from the channel. You have been warned."    }  }}</code></pre></div></li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Sat Sep 30, 2006 2:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2006-09-29T21:03:32-04:00</updated>

		<published>2006-09-29T21:03:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66787#p66787</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66787#p66787"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66787#p66787"><![CDATA[
Use:<br><div class="codebox"><p>Code: </p><pre><code>set badcomm(chans) "[list #Fuzzy #ForestHaven]"set badcomm(comms) "[list !find @find !list @list !packs @packs !search @search !warezlist @warezlist !xdcclist @xdcclist]"bind pubm -|- "% !*" pub:badcommandsbind pubm -|- "% @*" pub:badcommandsproc pub:badcommands {nickname hostname handle channel text} {  global badcomm  if {[lsearch -exact [string tolower $badcomm(chans)] [string tolower $channel]] == -1} { return }  set command [lindex [split $text] 0]  if {[lsearch -exact [string tolower $badcomm(comms)] [string tolower $command]] == -1} { return }  putserv "KICK $channel $nickname :The command you just entered '$command' is not allowed here due to it being commonly used by art and software pirates to find out whether or not a server hosts file archieves. Continuing to enter it will result in you being banned from the channel. You have been warned."}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Fri Sep 29, 2006 9:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mcdarby]]></name></author>
		<updated>2006-09-29T20:37:33-04:00</updated>

		<published>2006-09-29T20:37:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66786#p66786</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66786#p66786"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66786#p66786"><![CDATA[
Okay, I just tested Tosser's script, where I have this<br><div class="codebox"><p>Code: </p><pre><code>set badcomm(chans) "#Fuzzy #ForestHaven"set badcomm(comms) "!find @find !list @list !packs @packs !search @search !warezlist @warezlist !xdcclist @xdcclist"bind pubm -|- "% !*" pub:badcommandsbind pubm -|- "% @*" pub:badcommandsproc pub:badcommands {nickname hostname handle channel text} {  if {[lsearch -exact [string tolower $badcomm(chans)] [string tolower $channel]] == -1} { return }  set command [lindex [split $text] 0]  if {[lsearch -exact [string tolower $badcomm(comms)] [string tolower $command]] == -1} { return }  putserv "KICK $channel $nickname :The command you just entered '$command' is not allowed here due to it being commonly used by art and software pirates to find out whether or not a server hosts file archieves. Continuing to enter it will result in you being banned from the channel. You have been warned."}</code></pre></div>And I was getting a TCL error that is the following:<br><div class="codebox"><p>Code: </p><pre><code>&lt;BOT&gt; [20:25] Tcl error [pub:badcommands]: can't read "badcomm(chans)": no such variable</code></pre></div>And .set errInfo shows that following:<br><div class="codebox"><p>Code: </p><pre><code>&lt;BOT&gt; [20:25] #McDarby# set errorInfo&lt;BOT&gt; Currently: can't read "badcomm(chans)": no such variable&lt;BOT&gt; Currently:     while executing&lt;BOT&gt; Currently: "string tolower $badcomm(chans)"&lt;BOT&gt; Currently:     (procedure "pub:badcommands" line 2)&lt;BOT&gt; Currently:     invoked from within&lt;BOT&gt; Currently: "pub:badcommands $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5"</code></pre></div>Which I can't seem to find what is wrong now<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1594">mcdarby</a> — Fri Sep 29, 2006 8:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2006-09-29T15:54:26-04:00</updated>

		<published>2006-09-29T15:54:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66768#p66768</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66768#p66768"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66768#p66768"><![CDATA[
@mcdarby:<br>Nope, if it was'nt clear enough; this is what I intended:<div class="codebox"><p>Code: </p><pre><code>bind pubm -|- "% !*" pub:bancommsbind pubm -|- "% @*" pub:bancomms</code></pre></div>Replacing "*" with "% *" would be quite pointless...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Sep 29, 2006 3:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mcdarby]]></name></author>
		<updated>2006-09-29T15:51:02-04:00</updated>

		<published>2006-09-29T15:51:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66767#p66767</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66767#p66767"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66767#p66767"><![CDATA[
@nml375:<br><br>You mean change that bind from<br><div class="codebox"><p>Code: </p><pre><code>bind pubm -|- {*} pub:bancomms</code></pre></div>to<br><div class="codebox"><p>Code: </p><pre><code>bind pubm -|- {% !* and % @*} pub:bancomms</code></pre></div>?<br><br>Well, I would think that<br><div class="codebox"><p>Code: </p><pre><code>bind pubm -|- {% *} pub:bancomms</code></pre></div>might be better there.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1594">mcdarby</a> — Fri Sep 29, 2006 3:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2006-09-29T11:25:55-04:00</updated>

		<published>2006-09-29T11:25:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66761#p66761</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66761#p66761"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66761#p66761"><![CDATA[
@Azeem:<br>Unfortunately, that code is flawed, as you are using list commands on strings. What makes matters worse is that you use them on <span style="text-decoration:underline">unchecked</span> strings supplied by random users. Should any user in your channel write something containing characters such as (but not limited to) "{[]}", that code will start behaving very badly. Also, lsearch would generally be faster than iterating through the whole list of "badwords", especially if you keep it sorted.<br><br>@Tosser^^:<br>Nice code, you should however use something like this when building the channel and badwords lists:<div class="codebox"><p>Code: </p><pre><code>set bancomm(chans) [list #Fuzzy #ForestHaven]set bancomm(comms) [list !find @find .....]</code></pre></div>Also a suggestion, change the mask of the binding from "*" to "% !*" and "% @*" to enhance performance slightly<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Sep 29, 2006 11:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Azeem]]></name></author>
		<updated>2006-09-29T07:30:25-04:00</updated>

		<published>2006-09-29T07:30:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66757#p66757</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66757#p66757"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66757#p66757"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>#Number of channels..set channels "#Channel1 #channel2"#Command to ban..set bancommands { "!find""@find""!list""@list""!packs""@packs""!search""@search""!warezlist""@warezlist""!xdcclist""@xdcclist"}bind pubm -|- * pub:bancommsproc pub:bancomms {nick host hand chan arg} {global bancommands channelsset command [string tolower [lindex $arg 0]]foreach badcom [string tolower $bancommands] { if {([string match -nocase *$badcom* $command]) &amp;&amp; ([lsearch -exact [string tolower $channels] [string tolower $chan] ] != -1)} {   putserv "KICK $chan $nick :The command you just entered is not allowed here due to it being commonly used by art and software pirates to find out whether or not a server hosts file archieves. Continuing to enter it will result in you being banned from the channel. You have been warned."   }  }}</code></pre></div>Try it tested working..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8235">Azeem</a> — Fri Sep 29, 2006 7:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2006-09-29T06:45:41-04:00</updated>

		<published>2006-09-29T06:45:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66755#p66755</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66755#p66755"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66755#p66755"><![CDATA[
Try:<br><div class="codebox"><p>Code: </p><pre><code>set bancomm(chans) "#Fuzzy #ForestHaven"set bancomm(comms) "!find @find !list @list !packs @packs !search @search !warezlist @warezlist !xdcclist @xdcclist"bind pubm -|- {*} pub:bancommsproc pun:bancomms {nickname hostname handle channel text} {  if {[lsearch -exact [string tolower $bancomm(chans)] [string tolower $channel] == -1} { return }  set command [lindex [split $text] 0]  if {[lsearch -exact [string tolower $bancomm(comms)] [string tolower $command]] == -1} { return }  putserv "KICK $channel $nickname :The command you just entered '$command' is not allowed here due to it being commonly used by art and software pirates to find out whether or not a server hosts file archieves. Continuing to enter it will result in you being banned from the channel. You have been warned."}</code></pre></div>Not Tested.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Fri Sep 29, 2006 6:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mcdarby]]></name></author>
		<updated>2006-09-29T04:29:04-04:00</updated>

		<published>2006-09-29T04:29:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66750#p66750</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66750#p66750"/>
		<title type="html"><![CDATA[Help with this bad command kick script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66750#p66750"><![CDATA[
Hey there, I was trying to write a TCL script for my bot to kick on any of the listed commands being entered by anyone in any of the two channels I was trying to set it up in. This is what I have for a script, and when I tested it, the bot doesn't do anything in response.<br><div class="codebox"><p>Code: </p><pre><code>set bancomm(chans) "#Fuzzy #ForestHaven"set bancomm(comms) "!find @find !list @list !packs @packs !search @search !warezlist @warezlist !xdcclist @xdcclist"set bancomm(chans) [string tolower $bancomm(chans)]set bancomm(comms) [string tolower $bancomm(comms)]foreach chan $bancomm(chans) {bind pubm -|- "$chan $bancomm(comms)" pub:bancomms}proc pub:bancomms {nick host hand chan arg} {    putserv "KICK $chan $nick The command you just entered is not allowed here due to it being commonly used by art and software pirates to find out whether or not a server hosts file archieves. Continuing to enter it will result in you being banned from the channel. You have been warned."}</code></pre></div>Any idea what I may have done wrong?[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1594">mcdarby</a> — Fri Sep 29, 2006 4:29 am</p><hr />
]]></content>
	</entry>
	</feed>
