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

	<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>2007-02-26T15:24:37-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2007-02-26T15:24:37-04:00</updated>

		<published>2007-02-26T15:24:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70767#p70767</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70767#p70767"/>
		<title type="html"><![CDATA[.match *!*@ban.* as a pub command. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70767#p70767"><![CDATA[
<blockquote class="uncited"><div>Hmm, I'm guessing you meant in the foreach vars, I should've used</div></blockquote>Nope. They would never cause an error because the variable names contain no special characters...<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code># the elements you append to the matches list are strings...lappend matches "[lindex $ban 0] [lindex $ban 5]"# ...but later you treat them like lists...foreach match $matches {    ... [lindex $match 0] ... [lindex $match 1]"}</code></pre></div></div></blockquote>To fix it, you could just lappend them both as separate elements and do <div class="codebox"><p>Code: </p><pre><code>foreach {ban by} {...}</code></pre></div> or <div class="codebox"><p>Code: </p><pre><code>lappend matches [list [lindex $ban 0] [lindex $ban 5]]</code></pre></div> and keep the rest like it is.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Feb 26, 2007 3:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mavericku]]></name></author>
		<updated>2007-02-24T02:57:07-04:00</updated>

		<published>2007-02-24T02:57:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70668#p70668</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70668#p70668"/>
		<title type="html"><![CDATA[.match *!*@ban.* as a pub command. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70668#p70668"><![CDATA[
Thanks <strong class="text-strong">rosc2112</strong> for this, it is exactly what i requested. I'll handle the rest  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>L.E. <br><br>Oh on more question ..i've tried the sendftp.tcl in the tcl archive but it doesn't work, i've searched the forum and i found another post with a dcc .sendfile command, tried that but same result ..<br><br>it just freezes, and i've tried it on 2 different servers.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6346">mavericku</a> — Sat Feb 24, 2007 2:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-02-23T15:34:51-04:00</updated>

		<published>2007-02-23T15:34:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70659#p70659</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70659#p70659"/>
		<title type="html"><![CDATA[.match *!*@ban.* as a pub command. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70659#p70659"><![CDATA[
<blockquote class="uncited"><div>1) You do case sensitive GLOB matching with IRC BAN as a pattern. (brackets have a special meaning in glob matching - case doesn't matter on irc)</div></blockquote>i.e. [hi] will match either 'h' or 'i' and will not match '[hi]' (using string match).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Feb 23, 2007 3:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-02-23T15:29:04-04:00</updated>

		<published>2007-02-23T15:29:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70658#p70658</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70658#p70658"/>
		<title type="html"><![CDATA[.match *!*@ban.* as a pub command. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70658#p70658"><![CDATA[
Hmm, I'm guessing you meant in the foreach vars, I should've used like:<br><br>  foreach <ul> <li>$mybans and foreach <ul> <li>$matches.  <br><br>Is that what you mean?</li></ul></li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Fri Feb 23, 2007 3:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-02-23T15:24:02-04:00</updated>

		<published>2007-02-23T15:24:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70657#p70657</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70657#p70657"/>
		<title type="html"><![CDATA[.match *!*@ban.* as a pub command. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70657#p70657"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>I tested this, it worked for me. YMMV</div></blockquote>1) You do case sensitive GLOB matching with IRC BAN as a pattern. (brackets have a special meaning in glob matching - case doesn't matter on irc)<br>2) lindex used on strings is bad (and I know you know this <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">)</div></blockquote>I made the script the way it way requested. Mav knows enough to modify it if he wants it case-insensitive. And yeah I know it's not tcl-special char safe, but again, that's an exercise for Maverick <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>The results are lists aren't they? According to the [banlist] documentation, they are, and I used lappend to make the 'matches' list.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Fri Feb 23, 2007 3:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2007-02-23T09:06:29-04:00</updated>

		<published>2007-02-23T09:06:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70652#p70652</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70652#p70652"/>
		<title type="html"><![CDATA[.match *!*@ban.* as a pub command. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70652#p70652"><![CDATA[
<blockquote class="uncited"><div>I tested this, it worked for me. YMMV</div></blockquote>Indeed <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> It worked because your search pattern had the same case as your bans and the masks/handles did not contain any brackets and braces.<br>1) You do case sensitive GLOB matching with IRC BAN as a pattern. (brackets have a special meaning in glob matching - case doesn't matter on irc)<br>2) lindex used on strings is bad (and I know you know this <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Feb 23, 2007 9:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-02-23T07:19:19-04:00</updated>

		<published>2007-02-23T07:19:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70650#p70650</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70650#p70650"/>
		<title type="html"><![CDATA[.match *!*@ban.* as a pub command. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70650#p70650"><![CDATA[
banlist [channel]<br>    Returns: a list of global bans, or, if a channel is specified, a<br>      list of channel-specific bans. Each entry is a sublist containing:<br>      hostmask, comment, expiration timestamp, time added, last time<br>      active, and creator. The three timestamps are in unixtime format.<br>    Module: channels<br><br><br>Just filter the output of the banlist command to match your desired search mask. You know how to do the pub bind. <br>Something like:<br><div class="codebox"><p>Code: </p><pre><code>bind pub - test proc:banlistproc proc:banlist {nick uhost hand chan text} {        set text [split $text];#always split input for safety :P        set mybans [banlist $chan];set matches ""        if {$mybans != ""} {                foreach ban $mybans {                        if {[lsearch -start -6 $ban $text] != -1} {                                lappend matches "[lindex $ban 0] [lindex $ban 5]"                        }                }                if {$matches != ""} {                        set i 0                        puthelp "PRIVMSG $chan :Matching bans found: [llength $matches]"                        foreach match $matches {                                incr i                                puthelp "PRIVMSG $chan :$i: [lindex $match 0] banned by [lindex $match 1]"                        }                } else {                        puthelp "PRIVMSG $chan :No bans matching [join $text] found on channel $chan."                }        } else {                puthelp "PRIVMSG $chan :No bans for channel $chan."        }}putlog "test.tcl loaded"#-I_Really_hate-Word-Wrap!-######################################################################################</code></pre></div>I tested this, it worked for me. YMMV<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Fri Feb 23, 2007 7:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mavericku]]></name></author>
		<updated>2007-02-24T03:07:20-04:00</updated>

		<published>2007-02-23T04:56:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70649#p70649</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70649#p70649"/>
		<title type="html"><![CDATA[.match *!*@ban.* as a pub command. [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70649#p70649"><![CDATA[
Hi Guys,<br><br><br>as the title says i'd like your help .<br>I'd like to make a pub command that will search the bans list.<br><br>Example <br><br>.match *!*@172.21.* <br><br>Bot : Matching bans found 20, showing 5<br>bot : 1 . ban , banned by <br>bot : 2 . ban , banned by .<br>and so on.<br><br>Can you please lend me a hand here...<br><br>Mave<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6346">mavericku</a> — Fri Feb 23, 2007 4:56 am</p><hr />
]]></content>
	</entry>
	</feed>
