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

	<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>2008-07-18T21:05:44-04:00</updated>

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

		<entry>
		<author><name><![CDATA[eXtremer]]></name></author>
		<updated>2008-07-18T10:51:54-04:00</updated>

		<published>2008-07-18T10:51:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84064#p84064</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84064#p84064"/>
		<title type="html"><![CDATA[Who banned script [!whoban &lt;mask&gt;] - public cmd.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84064#p84064"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div><blockquote class="uncited"><div>***dcc partyline***<br>&lt;speechles&gt; .+ban *!*@*host.com #kangaroopocket %365d0h0m year ban<br>&lt;sp33chy&gt; New #test ban: *!*@*host.com (year ban)<br>&lt;speechles&gt; .+ban nick!ident@host* #test goodbye<br>&lt;sp33chy&gt; New #test ban: nick!ident@host* (goodbye)<br><br>***in channel #test***<br>&lt;speechles&gt; !whoban *!*@*<br>-sp33chy- <strong class="text-strong">Matching bans</strong>: <span style="text-decoration:underline">2</span> for *!*@* on #test:<br>-sp33chy- <strong class="text-strong">1</strong>) *!*@*host.com <strong class="text-strong">By:</strong> speechles <strong class="text-strong">Expires:</strong> in 52 weeks 23 hours 59 minutes 49 seconds. <strong class="text-strong">Reason:</strong> year ban<br>-sp33chy- <strong class="text-strong">2</strong>) nick!ident@host* <strong class="text-strong">By:</strong> speechles <strong class="text-strong">Expires:</strong> Never. <strong class="text-strong">Reason:</strong> goodbye</div></blockquote>Works just fine.. now. The problem stemmed from the fact I was trying to match against each ban sublist ([banlist $chan] is a list, with a sublist) with a string match (*slaps self hard*) which of course breaks a golden rule. You would've needed a * at the end of your query or it would've returned the no results found message. I've fixed this (USE THE EDITED CODE ABOVE I WROTE), it will work normally now and not  under/over match as well as now obeys every golden rule of tcl. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></div></blockquote>I edited that post too late I see. Do you see now? Use the edited code I originally posted. It will work correctly now. Enjoy. Long live dolphins and walruses.</div></blockquote>Yes, ok speechles I'll overwrite the code, thanks again ;)_<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9905">eXtremer</a> — Fri Jul 18, 2008 10:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-07-18T15:48:45-04:00</updated>

		<published>2008-07-18T10:35:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84063#p84063</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84063#p84063"/>
		<title type="html"><![CDATA[Who banned script [!whoban &lt;mask&gt;] - public cmd.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84063#p84063"><![CDATA[
I edited that post too late I see. Do you see now? Use the edited code I originally posted. It will work correctly now. Enjoy. Long live dolphins and walruses.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Fri Jul 18, 2008 10:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eXtremer]]></name></author>
		<updated>2008-07-18T10:33:44-04:00</updated>

		<published>2008-07-18T10:33:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84062#p84062</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84062#p84062"/>
		<title type="html"><![CDATA[Who banned script [!whoban &lt;mask&gt;] - public cmd.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84062#p84062"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>***dcc partyline***<br>&lt;speechles&gt; .+ban *!*@*host.com #kangaroopocket %365d0h0m year ban<br>&lt;sp33chy&gt; New #test ban: *!*@*host.com (year ban)<br>&lt;speechles&gt; .+ban nick!ident@host* #test goodbye<br>&lt;sp33chy&gt; New #test ban: nick!ident@host* (goodbye)<br><br>***in channel #test***<br>&lt;speechles&gt; !whoban *!*@*<br>-sp33chy- <strong class="text-strong">Matching bans</strong>: <span style="text-decoration:underline">2</span> for *!*@* on #test:<br>-sp33chy- <strong class="text-strong">1</strong>) *!*@*host.com <strong class="text-strong">By:</strong> speechles <strong class="text-strong">Expires:</strong> in 52 weeks 23 hours 59 minutes 49 seconds. <strong class="text-strong">Reason:</strong> year ban<br>-sp33chy- <strong class="text-strong">2</strong>) nick!ident@host* <strong class="text-strong">By:</strong> speechles <strong class="text-strong">Expires:</strong> Never. <strong class="text-strong">Reason:</strong> goodbye</div></blockquote>Works just fine. Don't know what you've done to break it. This will ONLY list eggdrop internal bans. If it's setting the ban in the channel, or via X/chanserv, yeah, this will not work. If for eggdrop's internal ban list ONLY.<br><br>Perhaps that ban script you have isn't using eggdrops internal ban system, and instead just placing bans onto the channel with no rhyme or reason?<br><br>Also "-Bot- There are no bans matching *!*@test.com found on #testbot."<br>This indicates there are bans on the channel, just none matching what your searching. Try instead <strong class="text-strong">!find *!*@*</strong> so you can see ALL bans for that channel. Then you can see that this indeed does work.</div></blockquote>Look:<br><br>Channel:<br><div class="codebox"><p>Code: </p><pre><code>&lt;eXtremer&gt; !b *!*@host.com 0 bye *** Bot sets mode: +b *!*@host.com-Bot- New mask added : *!*@test.com &lt;eXtremer&gt; !find *!*@host.com-Bot- There are no bans matching *!*@host.com found on #testbot.</code></pre></div>if *!*@* it works<br><div class="codebox"><p>Code: </p><pre><code>&lt;eXtremer&gt; !find *!*@*-Bot- Matching bans: 1 for *!*@* on #testbot:-Bot- 1) *!*@host.com By: eXtremer Expires: Never. Reason: bye </code></pre></div>DCC:<br><div class="codebox"><p>Code: </p><pre><code>.+ban *!*@mail.com #testbot 1 go[17:26] #eXtremer# (#Clas) +ban *!*@mail.com #testbot (1 go)New #testbot ban: *!*@mail.com (1 go)</code></pre></div><div class="codebox"><p>Code: </p><pre><code>&lt;eXtremer&gt; !find *!*@mail.com-Bot- There are no bans matching *!*@mail.com found on #testbot.</code></pre></div>I don't really understand...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9905">eXtremer</a> — Fri Jul 18, 2008 10:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-07-18T15:48:29-04:00</updated>

		<published>2008-07-18T09:30:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84060#p84060</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84060#p84060"/>
		<title type="html"><![CDATA[Who banned script [!whoban &lt;mask&gt;] - public cmd.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84060#p84060"><![CDATA[
<blockquote class="uncited"><div>***dcc partyline***<br>&lt;speechles&gt; .+ban *!*@*host.com #test %365d0h0m year ban<br>&lt;sp33chy&gt; New #test ban: *!*@*host.com (year ban)<br>&lt;speechles&gt; .+ban nick!ident@host* #test goodbye<br>&lt;sp33chy&gt; New #test ban: nick!ident@host* (goodbye)<br><br>***in channel #test***<br>&lt;speechles&gt; !whoban *!*@*<br>-sp33chy- <strong class="text-strong">Matching bans</strong>: <span style="text-decoration:underline">2</span> for *!*@* on #test:<br>-sp33chy- <strong class="text-strong">1</strong>) *!*@*host.com <strong class="text-strong">By:</strong> speechles <strong class="text-strong">Expires:</strong> in 52 weeks 23 hours 59 minutes 49 seconds. <strong class="text-strong">Reason:</strong> year ban<br>-sp33chy- <strong class="text-strong">2</strong>) nick!ident@host* <strong class="text-strong">By:</strong> speechles <strong class="text-strong">Expires:</strong> Never. <strong class="text-strong">Reason:</strong> goodbye</div></blockquote>Works just fine.. now. The problem stemmed from the fact I was trying to match against each ban sublist ([banlist $chan] is a list, with a sublist) with a string match (*slaps self hard*) which of course breaks a golden rule. You would've needed a * at the end of your query or it would've returned the no results found message. I've fixed this (USE THE EDITED CODE ABOVE I WROTE), it will work normally now and not  under/over match as well as now obeys every golden rule of 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=8138">speechles</a> — Fri Jul 18, 2008 9:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eXtremer]]></name></author>
		<updated>2008-07-18T03:27:51-04:00</updated>

		<published>2008-07-18T03:27:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84056#p84056</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84056#p84056"/>
		<title type="html"><![CDATA[Who banned script [!whoban &lt;mask&gt;] - public cmd.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84056#p84056"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>bind pub - !whoban proc:banlistproc proc:banlist {nick uhost hand chan text} {   set text [lindex [split $text] 0]   set mybans [banlist $chan]   if {[llength $mybans] &gt; 0} {      set matches {}      foreach ban $mybans {         if {[string match -nocase $text $ban]} {            set bann [lindex $ban 0]            set banby [nick2hand [lindex $ban 5] $chan]            set remain [expr [lindex $ban 2] - [unixtime]]            set reason [lindex $ban 1]            if {$remain &gt; 0} {               set remain "in [duration $remain]."            } {               set remain "Never."            }            lappend matches [list "$bann" "$banby" "$remain" "$reason"]         }      }      if {[llength $matches] &gt; 0} {         set i 1         puthelp "NOTICE $nick :\002Matching bans\002: \037[llength $matches]\037 for $text on $chan:"         foreach match $matches {            puthelp "NOTICE $nick :\002$i\002\) [lindex $match 0] \002By:\002 [lindex $match 1] \002Expires:\002 [lindex $match 2] \002Reason:\002 [lindex $match 3]"            incr i         }      } else {         puthelp "NOTICE $nick :There are \002no bans\002 matching \037$text\037 found on $chan."      }   } else {      puthelp "NOTICE $nick :There are \002no bans\002 placed for $chan. I cannot search for \037$text\037."   }}</code></pre></div></div></blockquote>thanks speechles, but the script is not working <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><div class="codebox"><p>Code: </p><pre><code>&lt;eXtremer&gt; !b *!*@test.com*** Bot sets mode: +b *!*@test.com-Bot- New mask added : *!*@test.com&lt;eXtremer&gt; !find *!*@test.com-Bot- There are no bans matching *!*@test.com found on #testbot.</code></pre></div>What's wrong ?<br><br>P.S.: I replaced the "!whoban" cmd with "!find" command.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9905">eXtremer</a> — Fri Jul 18, 2008 3:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-07-18T21:05:44-04:00</updated>

		<published>2008-07-17T02:39:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84032#p84032</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84032#p84032"/>
		<title type="html"><![CDATA[Who banned script [!whoban &lt;mask&gt;] - public cmd.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84032#p84032"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># BanFIND by speechles# no dolphins or walrus were harmed in the creation of this script ;)bind pub - !bfind proc:banlistproc proc:banlist {nick uhost hand chan text} {   set text [lindex [split $text] 0]   set mybans [banlist $chan]   if {[llength $mybans] &gt; 0} {      set matches {}      foreach ban $mybans {         if {[string match -nocase $text [set bann [lindex $ban 0]]]} {            set banby [lindex $ban 5]            if {[set remain [expr [lindex $ban 2] - [unixtime]]] &gt; 0} {               set remain "in [duration $remain]"            } else {               set remain "Never."            }            if {[string match "" [set reason [lindex $ban 1]]]} {               set reason "No reason given"            }            lappend matches [list "$bann" "$banby" "$remain" "$reason"]         }      }      if {[llength $matches] &gt; 0} {         set i 1         puthelp "NOTICE $nick :\002Matching bans\002: \037[llength $matches]\037 for $text on $chan:"         foreach match $matches {            puthelp "NOTICE $nick :\002$i\002\) [lindex $match 0] \002By:\002 [lindex $match 1] \002Expires:\002 [lindex $match 2] \002Reason:\002 [lindex $match 3]"            incr i         }      } else {         puthelp "NOTICE $nick :There are \002no bans\002 matching \037$text\037 found on $chan."      }   } else {      puthelp "NOTICE $nick :There are \002no bans\002 placed for $chan. I cannot search for \037$text\037."   }}</code></pre></div>Edited to correct minor problems mentioned below. Now functional 100% and elegantly <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 17, 2008 2:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[eXtremer]]></name></author>
		<updated>2008-07-17T01:50:31-04:00</updated>

		<published>2008-07-17T01:50:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84030#p84030</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84030#p84030"/>
		<title type="html"><![CDATA[Who banned script [!whoban &lt;mask&gt;] - public cmd.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84030#p84030"><![CDATA[
Hi all.<br>I need a script that will find a ban in the banlist.<br>For example:<br><br>&lt;Me&gt; !whoban *!*@host.com<br><em class="text-italics">now the bot will msg me via notice</em><br>&lt;Bot&gt; *!*@host.com was banned by: Me Expire: expires in 2 days 3 hours 15 minutes. Reason: No Reason. <br><br>I have the !banlist cmd, but it shows me all the bans &amp; if the banlist is big, it's really annoying !<br>Waiting for a reply.<br><br>P.S.: "banned by" must show the handle not the nick.<br><br>Thanks in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9905">eXtremer</a> — Thu Jul 17, 2008 1:50 am</p><hr />
]]></content>
	</entry>
	</feed>
