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

	<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-04T00:41:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-03-04T00:41:18-04:00</updated>

		<published>2006-03-04T00:41:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60838#p60838</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60838#p60838"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60838#p60838"><![CDATA[
<blockquote class="uncited"><div>How is it my fault that your script can't handle [ as part of a banned channel name?</div></blockquote>it's your fault that you think my script can't handle it, and it can; it's your fault than you are unable to escape correctly square brackets in a regexp; and unfortunately, you can't seem to comprehend what I'm saying to you<br><blockquote class="uncited"><div>Really, if you all don't know the answer, why bother replying?</div></blockquote>I know every answer of every question about xchannel.tcl; I wrote the thing, remember?<br><br>anyhow, it's commendable you bothered to help yourself and write a script that - albeit naive and buggy - works for you<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sat Mar 04, 2006 12:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-03-03T19:45:57-04:00</updated>

		<published>2006-03-03T19:45:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60832#p60832</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60832#p60832"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60832#p60832"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set badnicks "\sex \s3x \\{ \\\ \\[ \\] \\}"</code></pre></div>This is incorrect, badnicks is a string here and not a list. Use<div class="codebox"><p>Code: </p><pre><code>set badnicks { "sex" "s3x" "\{" "\\"  "\["  "\]"  "\}"}</code></pre></div><strong class="text-strong">[</strong> would've worked perfectly if [string equal] was used instead of [string match] since <strong class="text-strong">[]</strong> has special meaning in [string match] so using <strong class="text-strong">\[</strong> will solve the problem.<br><br>PS: That wouldn't work if <ul> <li>was used instead of {}. If <ul> <li>is used, then you'll have to add <strong class="text-strong">{\[}</strong> or <strong class="text-strong">\\\[</strong> instead of just <strong class="text-strong">\[</strong>.</li></ul></li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Mar 03, 2006 7:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-03-03T12:30:36-04:00</updated>

		<published>2006-03-03T12:30:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60822#p60822</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60822#p60822"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60822#p60822"><![CDATA[
I found a solution.  This bans { [ } ] \ and so forth in nicks.<br><div class="codebox"><p>Code: </p><pre><code>set badnicks "\sex \s3x \\{ \\\ \\[ \\] \\}"set bnduration 1m ### Set Your Ban Reasonset badnickreason "Bad nick."bind join - * filter_bad_nicksbind nick - * filter_bad_nicksproc filter_bad_nicks {nick uhost hand channel {nn ""}} {        global badnicks badnickreason banmask botnick bnduration        if {$nn == ""} { set nn $nick }        set handle [nick2hand $nick]        set banmask "*$nick*!*@*"        if {![isbotnick $nick]} {        foreach badnick [string tolower [split $badnicks]] {                if {[string match -nocase *$badnick* $nn] == 1} {                        if {([matchattr $handle +f] == 1) || ([matchattr $handle +o] == 1)} {                               puthelp "PRIVMSG $channel :Ohh, aren't you so cool with that naughty nick, $nick..&lt;eyeroll&gt;"                                return 0                                } else {                                        putquick "KICK $channel $nick :$badnickreason"                                        newchanban $channel $banmask $botnick $badnickreason $bnduration                                }                        }                }        }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Fri Mar 03, 2006 12:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-03-03T06:19:50-04:00</updated>

		<published>2006-03-03T06:19:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60808#p60808</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60808#p60808"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60808#p60808"><![CDATA[
How is it my fault that your script can't handle [ as part of a banned channel name?<br><br>Really, if you all don't know the answer, why bother replying?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Fri Mar 03, 2006 6:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-03-03T05:18:32-04:00</updated>

		<published>2006-03-03T05:18:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60805#p60805</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60805#p60805"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60805#p60805"><![CDATA[
that's not xchannel's fault, that's your fault<br><br>learn regexps<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Mar 03, 2006 5:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-03-03T04:56:46-04:00</updated>

		<published>2006-03-03T04:56:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60804#p60804</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60804#p60804"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60804#p60804"><![CDATA[
Same problem with that xchannels.tcl script, it does not handle "[" as an item to ban. It handled "{" but I've already fixed that. I have been unable to get any script to handle "[" as a char to ban on.<br><br>This is what xchannels.tcl says, when I tested it with [ in the badwhois.txt:<br><br>[03:48] Tcl error [::xchannel::gotwhois]: couldn't compile regular expression pattern: brackets [] not balanced<br><br>So, does anyone have a real solution to this?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Fri Mar 03, 2006 4:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-03-03T00:40:23-04:00</updated>

		<published>2006-03-03T00:40:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60790#p60790</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60790#p60790"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60790#p60790"><![CDATA[
<blockquote class="uncited"><div>Try examining <a href="http://demond.net/xchannel.tcl" class="postlink">xchannel.tcl</a> by demond for inspiration.</div></blockquote>actually it doesn't work on nicks, but on realnames, channels joined, and server name<br><br>there is absolutely no need of a script to ban "bad" nicks, you simply create +k user record and add *nick*!*@* masks to it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Mar 03, 2006 12:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-03-02T22:45:42-04:00</updated>

		<published>2006-03-02T22:45:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60788#p60788</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60788#p60788"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60788#p60788"><![CDATA[
Try examining <a href="http://demond.net/xchannel.tcl" class="postlink">xchannel.tcl</a> by demond for inspiration.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Thu Mar 02, 2006 10:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-03-02T22:34:56-04:00</updated>

		<published>2006-03-02T22:34:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60787#p60787</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60787#p60787"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60787#p60787"><![CDATA[
Been there, don't know how to apply it in this case..Actually, I did apply it, and fixed the problem with handling "{"  but it didn't help with handling "["<br><br><br>Anyone else have a clue?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Thu Mar 02, 2006 10:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-03-02T22:14:50-04:00</updated>

		<published>2006-03-02T22:14:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60786#p60786</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60786#p60786"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60786#p60786"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set badnicks { "sex" "s3x" "{" "["}</code></pre></div>You may also wish to read the following page:<br><br><a href="http://www.peterre.com/characters.html" class="postlink">How to write eggdrop scripts that won't choke on special characters</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Thu Mar 02, 2006 10:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-03-02T22:01:45-04:00</updated>

		<published>2006-03-02T22:01:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60785#p60785</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60785#p60785"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60785#p60785"><![CDATA[
Did you mean to have "set set" or was that a typo?  Using just "set badnicks { "this" "that" "{" }  makes the bot crash..Thats why I made it use <ul><li>but that still crashes on trying to use "[" in the banlist..</li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Thu Mar 02, 2006 10:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-03-03T19:40:40-04:00</updated>

		<published>2006-03-02T21:44:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60782#p60782</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60782#p60782"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60782#p60782"><![CDATA[
Instead of using <ul><li>, use {}. i.e.<div class="codebox"><p>Code: </p><pre><code>set badnicks { "sex" "s3x" "{" "["}</code></pre></div></li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Mar 02, 2006 9:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-03-02T21:35:35-04:00</updated>

		<published>2006-03-02T21:35:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=60781#p60781</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=60781#p60781"/>
		<title type="html"><![CDATA[banning bad nicks with { and other special chars]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=60781#p60781"><![CDATA[
I've looked at bunches of badnick ban scripts, and they all seem to have this one problem in common, and that is, not handling {  or [ special chars. I managed to fix this script to handle "{"  but I'm at a loss as to how to make it handle "["   <br><br>I've looked through the forums and documentation, but I can't figure out how to handle this.<br><br>This is what I have:<div class="codebox"><p>Code: </p><pre><code>set badnicks [list \"sex" \"s3x" \"{" \"["]    set bnduration 1mset badnickreason "Don't use offensive words in your nick.."bind join - * filter_bad_nicksbind nick - * filter_bad_nicksproc filter_bad_nicks {nick uhost hand channel} { global badnicks badnickreason banmask botnick bnduration  set handle [nick2hand $nick]   set banmask "*$nick*!*@*"        foreach badnick [string tolower [split $badnicks]] {        if {[string match -nocase *$badnick* $nick]}  {       if {[matchattr $handle +f]} {           putlog "-Anti Bad Nick Script- $nick ($handle) with +f joined $channel"           puthelp "PRIVMSG $channel :Ohh, aren't you so cool with that naughty nick, $nick..&lt;eyeroll&gt;"       } elseif {[matchattr $handle +o]} {           putlog "-Anti Bad Nick Script- $nick ($handle) with +o flags joined $channel"           puthelp "PRIVMSG $channel :Ohh, aren't you so cool with that naughty nick, $nick..&lt;eyeroll&gt;"       } else {           putlog "-Anti Bad Nick Script- KICKED $nick on joining $channel"           putquick "KICK $channel $nick :$badnickreason"           newchanban $channel $banmask $botnick $badnickreason $bnduration       }    }     }}</code></pre></div>How would I fix this?  Any clues appreciated =)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Thu Mar 02, 2006 9:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Linux]]></name></author>
		<updated>2005-04-10T17:16:09-04:00</updated>

		<published>2005-04-10T17:16:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47962#p47962</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47962#p47962"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47962#p47962"><![CDATA[
Its much better if Bot bans ONLY badnicks not the IP/host <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code>set badnicks [list "*word1*" "*word2*" "*word3*"] bind join - * ban:bnick bind nick - * ban:bnick proc ban:bnick {nick uhost hand chan {nn ""}} { global badnicks set bbanmask "*$nick*!*@*" if {$nn == ""} { set nn $nick } if {![isbotnick $nick]} {   foreach badnick $badnicks {    if {[string match -nocase  $badnick $nn]} {     putserv "MODE $chan +b $bbanmask"     putserv "KICK $chan $nick :Bad nick detected."     break    }   }  } }</code></pre></div>-REGARDS-<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4783">Linux</a> — Sun Apr 10, 2005 5:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Bingooss]]></name></author>
		<updated>2005-03-19T08:39:06-04:00</updated>

		<published>2005-03-19T08:39:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47934#p47934</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47934#p47934"/>
		<title type="html"><![CDATA[Searching For the Script which can Ban Badnicks!!!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47934#p47934"><![CDATA[
It Seems to work fine. Thankx for your reply. Have nice time..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5459">Bingooss</a> — Sat Mar 19, 2005 8:39 am</p><hr />
]]></content>
	</entry>
	</feed>
