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

	<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>2004-10-31T11:32:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-10-31T11:32:34-04:00</updated>

		<published>2004-10-31T11:32:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42428#p42428</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42428#p42428"/>
		<title type="html"><![CDATA[Badnick3.0.tcl &lt;== my bot kickban to all users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42428#p42428"><![CDATA[
caesar:<br><br>The way I used the timer that also works. If you have more "'s just add an extra \ infront of them they work perfectly. I didn't use list because I am not calling to another proc neither passing variables or so.<br><br>Yeah isop and isvoice are redundant, but if we make another proc to delay the main proc with a utimer 1-2 secs then it would be handy as ChanServ gives some delay in milliseconds to op the person after he joins the channel.<br><br>The warning thing would require a bit more of coding, but I think it's useless. People already know channel rules and if they don't they can read the kick message change their nick and come back in after they are kicked. We don't need to stress the bot make it send warnings and stuff.<br><br>It could be something like this then:<br><div class="codebox"><p>Code: </p><pre><code>#Set the 'bad nicks' to kick/ban out of the channel.set badnicks { "nick1" "nick2" "nick3" }#Set the channels to activate this script on.set badnickchans "#mychan1 #mychan2"#Set the bantime.set badnickbantime "60"##### SCRIPT #####bind join - "*" bad:nick:delayproc bad:nick:delay {nick host hand chan} { utimer 2 [list bad:nick $nick $host $hand $chan]}proc bad:nick {nick host hand chan} { global badnicks badnickchans badnickbantime  if {([lsearch -exact [string tolower $badnickchans] [string tolower $chan]] != -1) &amp;&amp; (![isbotnick $nick])} {   foreach badnick $badnicks {    if {([string match -nocase *$badnick* $nick])} {      if {([botisop $chan]) &amp;&amp; (![isop $nick $chan]) &amp;&amp; (![isvoice $nick $chan]) &amp;&amp; (![matchattr $hand mn|mn $chan])} {        set badnickban1 "*$badnick*!*@*"; set badnickban2 "*!*@[lindex [split $host @] 1]"        set ban "MODE $chan +bb $badnickban1 $badnickban2\n"        set kick "KICK $chan $nick :0,1 Bad Nick Kick 2,0 - Unacceptable user nick *$badnick* 2detected. Please change your 2'nick' 12to a suitable one and then 2rejoin back.2\n"        putdccraw 0 [string length $ban] $ban; putdccraw 0 [string length $kick] $kick        timer $badnickbamtime "pushmode $chan -b $badnickban2"        return 0        }      }    }  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sun Oct 31, 2004 11:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2004-10-30T19:30:23-04:00</updated>

		<published>2004-10-30T19:30:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42419#p42419</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42419#p42419"/>
		<title type="html"><![CDATA[Badnick3.0.tcl &lt;== my bot kickban to all users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42419#p42419"><![CDATA[
Since this is an on-join check I doubt you will need this "(![isop $nick $chan]) &amp;&amp; (![isvoice $nick $chan])" and<blockquote class="uncited"><div>timer $badnickbamtime "pushmode $chan -b $badnickban2"</div></blockquote>should be a <ul><li>? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> <br><br>Lil tip:<br>Instead of "global badnicks badnickchans badnickbantime" make your variables like: bad(nicks) and bad(chans) and just call global bad. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Id go for an string match rather than an lsearch. haven't tested wich one is faster.<br><br>ps: rejoin back?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised"><br><br>edit:<br>here are my *time* tests on lsearch with "string tolower" and the string match<blockquote class="uncited"><div>% time {set t "foo moo bar" ; set s "mOo" ; lsearch -exact [string tolower $t] [string tolower $s]}<br>76 microseconds per iteration<br>% time {set t "foo moo bar" ; set s "mOo" ; lsearch -exact [string tolower $t] [string tolower $s]}<br>60 microseconds per iteration<br>% time {set t "foo moo bar" ; set s "mOo" ; lsearch -exact [string tolower $t] [string tolower $s]}<br>62 microseconds per iteration<br><br>% time {set t "foo moo bar" ; set s "mOo" ; string match -nocase $t $s}<br>23 microseconds per iteration<br>% time {set t "foo moo bar" ; set s "mOo" ; string match -nocase $t $s}<br>41 microseconds per iteration<br>% time {set t "foo moo bar" ; set s "mOo" ; string match -nocase $t $s}<br>36 microseconds per iteration</div></blockquote>ps: dosen't lsearch have a -nocase thing like string match has? umm..</li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Oct 30, 2004 7:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bLEIFus]]></name></author>
		<updated>2004-10-30T17:45:04-04:00</updated>

		<published>2004-10-30T17:45:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42418#p42418</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42418#p42418"/>
		<title type="html"><![CDATA[Badnick3.0.tcl &lt;== my bot kickban to all users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42418#p42418"><![CDATA[
Thank you awyeah, n1ce script, works as wanted. It would be nice feature if this script warns first ( kick ) and then bans. Maybe with a adjustable number of warnings. Thats what i like in the other "non-proper-working" script........<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5152">bLEIFus</a> — Sat Oct 30, 2004 5:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-10-30T08:51:35-04:00</updated>

		<published>2004-10-30T08:51:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42414#p42414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42414#p42414"/>
		<title type="html"><![CDATA[Badnick3.0.tcl &lt;== my bot kickban to all users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42414#p42414"><![CDATA[
From what I see there are alot of useless things in that script, for a simple one use this, like I do:<br><div class="codebox"><p>Code: </p><pre><code>#Set the 'bad nicks' to kick/ban out of the channel.set badnicks { "nick1" "nick2" "nick3" }#Set the channels to activate this script on.set badnickchans "#mychan1 #mychan2"#Set the bantime.set badnickbantime "60"##### SCRIPT #####bind join - "*" bad:nickproc bad:nick {nick host hand chan} { global badnicks badnickchans badnickbantime  if {([lsearch -exact [string tolower $badnickchans] [string tolower $chan]] != -1) &amp;&amp; (![isbotnick $nick])} {   foreach badnick $badnicks {    if {([string match -nocase *$badnick* $nick])} {      if {([botisop $chan]) &amp;&amp; (![isop $nick $chan]) &amp;&amp; (![isvoice $nick $chan]) &amp;&amp; (![matchattr $hand mn|mn $chan])} {        set badnickban1 "*$badnick*!*@*"; set badnickban2 "*!*@[lindex [split $host @] 1]"        set ban "MODE $chan +bb $badnickban1 $badnickban2\n"        set kick "KICK $chan $nick :0,1 Bad Nick Kick 2,0 - Unacceptable user nick *$badnick* 2detected. Please change your 2'nick' 12to a suitable one and then 2rejoin back.2\n"        putdccraw 0 [string length $ban] $ban; putdccraw 0 [string length $kick] $kick        timer $badnickbamtime "pushmode $chan -b $badnickban2"        }      }    }  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Oct 30, 2004 8:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bLEIFus]]></name></author>
		<updated>2004-10-30T07:16:28-04:00</updated>

		<published>2004-10-30T07:16:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42412#p42412</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42412#p42412"/>
		<title type="html"><![CDATA[Badnick3.0.tcl &lt;== my bot kickban to all users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42412#p42412"><![CDATA[
<blockquote class="uncited"><div>Try this and see if it fixes anything:<div class="codebox"><p>Code: </p><pre><code>set bnick {   *rape*   *fuk* }</code></pre></div></div></blockquote>Hmmm this does not fix the problem  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5152">bLEIFus</a> — Sat Oct 30, 2004 7:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2004-10-30T03:13:26-04:00</updated>

		<published>2004-10-30T03:13:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42408#p42408</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42408#p42408"/>
		<title type="html"><![CDATA[Badnick3.0.tcl &lt;== my bot kickban to all users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42408#p42408"><![CDATA[
from what I can see he does not use <em class="text-italics">string match</em> as matching but <em class="text-italics">regexp</em>....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sat Oct 30, 2004 3:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2004-10-29T17:38:26-04:00</updated>

		<published>2004-10-29T17:38:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42397#p42397</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42397#p42397"/>
		<title type="html"><![CDATA[Badnick3.0.tcl &lt;== my bot kickban to all users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42397#p42397"><![CDATA[
Try this and see if it fixes anything:<div class="codebox"><p>Code: </p><pre><code>set bnick {   *rape*   *fuk* }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Fri Oct 29, 2004 5:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[bLEIFus]]></name></author>
		<updated>2004-10-29T16:08:53-04:00</updated>

		<published>2004-10-29T16:08:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42396#p42396</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42396#p42396"/>
		<title type="html"><![CDATA[Badnick3.0.tcl &lt;== my bot kickban to all users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42396#p42396"><![CDATA[
Hmmm, i know, this is an old topic, but i have the same problem with this script. it kicks+bans all users joining my chan. Is there a solution for it?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5152">bLEIFus</a> — Fri Oct 29, 2004 4:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[forever79]]></name></author>
		<updated>2003-11-30T09:48:01-04:00</updated>

		<published>2003-11-30T09:48:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30890#p30890</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30890#p30890"/>
		<title type="html"><![CDATA[**** &lt;== is f.u.c.k , this form not show it]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30890#p30890"><![CDATA[
**** &lt;== is f.u.c.k , this form not show it <br><br>i try to this code <br><div class="codebox"><p>Code: </p><pre><code>set bnick {   "*rape*"   "*fuk*" } </code></pre></div>but my bot is kickban to all users<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3368">forever79</a> — Sun Nov 30, 2003 9:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-11-30T09:02:44-04:00</updated>

		<published>2003-11-30T09:02:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30886#p30886</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30886#p30886"/>
		<title type="html"><![CDATA[Badnick3.0.tcl &lt;== my bot kickban to all users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30886#p30886"><![CDATA[
<blockquote class="uncited"><div>set bnick { <br>  "******"<br>[snip]</div></blockquote>a snigle "*" will match any word or nick in your case, it will even match a paragraph, if you want to match only 1 letter then use "?" so instead of ****** use ??????<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Nov 30, 2003 9:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[forever79]]></name></author>
		<updated>2003-11-30T07:57:03-04:00</updated>

		<published>2003-11-30T07:57:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30878#p30878</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30878#p30878"/>
		<title type="html"><![CDATA[Badnick3.0.tcl &lt;== my bot kickban to all users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30878#p30878"><![CDATA[
hi<br>i want to use badnick protection on my bot<br>i try to badnick3.0<br>and my bot kickban to all users<br>what is the problem<br><div class="codebox"><p>Code: </p><pre><code>#Set this to all the bad nicks you would like to ban for.Wildcards supported.set bnick {  "*[censored]*"   "*rape*"   "*fuk*"   "*badwa"   "*phudi*"   "*fudi"   "*pussy*"   "*boobs*"   "*porn*"   "*p0rn*"}#Set this to the time for which you would like to place a bad nick host on ban.#0 makes the ban permanent.(Not recommended)set bnick_bantime 30#Set this to the time after which you would like to reset the timer for the#bad nick.set bnick_reset 60#Set this to the number of times you want to warn before you would like to#place ban.0 gives no warnings.set bnick_warnings 0#Set this to the reason to be given while kicking the offender the first time.set bnick_kick "Your nick offends me.Change it and come back."#Set this to the reason while banning the user after bnick_warnings have expiredset bnick_ban "I think I told you to change ur nick.Now we don't need you."# How do you want it to mask a ban?  Default == 2#      0 - *!user@host.domain#      1 - *!*user@host.domain#      2 - *!*@host.domain#      3 - *!*user@*.domain#      4 - *!*@*.domain#      5 - nick!user@host.domain#      6 - nick!*user@host.domain#      7 - nick!*@host.domain#      8 - nick!*user@*.domain#      9 - nick!*@*.domain#     You can also specify a type of 10 to 19 which correspond to masks 0 to 9, but#     instead of using a * wildcard to replace portions of the host.domain, it uses ?#     wildcards to replace the numbers in the address.set bnick_ban_type 2################################################################################# You can edit below this but dont mail me if things start acting weird :Ş  #################################################################################bind join - * bnick:checkbind nick - * bnick:checkproc bnick:check {nick uhost hand chan {newnick ""}} {global logo bnicks bnick_bantime bnick bnick_reset bnick_warnings bnick_kick bnick_ban bnick_ban_typeif {$newnick == ""} {set newnick $nick}foreach bword [split $bnick "\n"] {if {[regexp -nocase $bword $newnick] &amp;&amp; [botisop $chan]} {if {![info exists bnicks($uhost)]} {set bnicks($uhost) 1putkick $chan $newnick "$bnick_kick [count_update 0]  $logo"timer $bnick_reset "unset bnicks($uhost)"putlog "Warned and kicked $newnick on $chan for using bad nicks."puthelp "NOTICE $newnick :Change your nick before you come to $chan.The next time I catch you using bad nicks, I will ban you.  $logo"} {if {$bnicks($uhost) &lt; $bnick_warnings} {incr bnicks($uhost)bnick:resettimer "bnicks($uhost)"timer $bnick_reset "unset bnicks($uhost)"putkick $chan $newnick "Warning $bnicks($uhost) for using bad nicks.Be careful I am watching you... [count_update 0]  $logo"puthelp "NOTICE $newnick :Join $chan with a bad nick for [expr $bnick_warnings - $bnick($uhost)] more time(s) and I will make sure you will join no more.  $logo"putlog "Warning $bnick($uhost) for $newnick on $chan for using bad nicks."} {unset bnicks($uhost)bnick:resettimer "bnicks($uhost)"newchanban $chan [bnick:masktype $nick!$uhost $bnick_ban_type] "Bad Nick Protection" "$bnick_ban [count_update 1]  $logo" $$bnick_bantimeputkick $chan $newnick "$bnick_ban [count_update 1]  $logo"}}}}}proc bnick:resettimer {reset} {foreach time_check [string tolower [timers]] {if {[string match *$reset* $time_check]} {killtimer [lindex [split $time_check] end]}}}proc bnick:replace {string subs} { if {[llength $subs] == "1"} {set subs [lindex $subs 0]} for {set i 0} {[lindex $subs $i] != ""} {incr i 2} {  regsub -all -- [lindex $subs $i] $string [lindex $subs [expr $i+1]] string } ; return $string}proc bnick:masktype {uhost type} { if {![string match "*!*@*.*" $uhost]} {  set nick [lindex [split $uhost "!"] 0] ; set uhost "$nick![getchanhost $nick]"  if {$uhost == "$nick!"} {set type "return_nothing"} } switch -exact $type {  0 {set ban "*[string range $uhost [string first ! $uhost] e]"}  1 {set ban "*!*[string trimleft [string range $uhost [expr [string first ! $uhost]+1] e] "~"]"}  2 {set ban "*!*[string range $uhost [string first @ $uhost] e]"}  3 {   set ident [string range $uhost [expr [string first ! $uhost]+1] [expr [string last @ $uhost]-1]]   set ban "*!*[string trimleft $ident "~"][string range [maskhost $uhost] [string first @ [maskhost $uhost]] e]"  }  4 {set ban "*!*[string range [maskhost $uhost] [string last "@" [maskhost $uhost]] e]"}  5 {set ban $uhost}  6 {   set nick [string range $uhost 0 [expr [string first "!" $uhost]-1]]   set ident [string range $uhost [expr [string first "!" $uhost]+1] [expr [string last "@" $uhost]-1]]   set ban "$nick!*[string trimleft $ident "~"][string range $uhost [string last "@" $uhost] e]"  }  7 {   set nick [string range $uhost 0 [expr [string first "!" $uhost]-1]]   set ban "$nick!*[string range $uhost [string last "@" $uhost] e]"  }  8 {   set nick [string range $uhost 0 [expr [string first "!" $uhost]-1]]   set ident [string range $uhost [expr [string first "!" $uhost]+1] [expr [string last "@" $uhost]-1]]   set ban "$nick!*[string trimleft $ident "~"][string range [maskhost $uhost] [string last "@" [maskhost $uhost]] e]"  }  9 {   set nick [string range $uhost 0 [expr [string first "!" $uhost]-1]]   set ban "$nick!*[string range [maskhost $uhost] [string last "@" [maskhost $uhost]] e]"  }  10 {   set host [string range $uhost [string last "@" $uhost] e]   if {[bnick:findip [string range $host 1 e]] == "0"} {    set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]    set ident [string range $uhost [expr [string first "!" $uhost]+1] [expr [string last "@" $uhost]-1]]    set ban "*!$ident$host"   } {set ban [bnick:masktype $uhost 0]}  }  11 {   set host [string range $uhost [string last "@" $uhost] e]   if {[bnick:findip [string range $host 1 e]] == "0"} {    set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]    set ident [string range $uhost [expr [string first "!" $uhost]+1] [expr [string last "@" $uhost]-1]]    set ban "*!*[string trimleft $ident "~"]$host"   } {set ban [bnick:masktype $uhost 1]}  }  12 {   set host [string range $uhost [string last "@" $uhost] e]   if {[bnick:findip [string range $host 1 e]] == "0"} {    set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]    set ban "*!*$host"   } {set ban [bnick:masktype $uhost 2]}  }  13 {   set host [string range $uhost [string last "@" $uhost] e]   if {[bnick:findip [string range $host 1 e]] == "0"} {set ban [bnick:masktype $uhost 11]} {set ban [bnick:masktype $uhost 3]}  }  14 {   set host [string range $uhost [string last "@" $uhost] e]   if {[bnick:findip [string range $host 1 e]] == "0"} {set ban [bnick:masktype $uhost 12]} {set ban [bnick:masktype $uhost 4]}  }  15 {   set host [string range $uhost [string last "@" $uhost] e]   if {[bnick:findip [string range $host 1 e]] == "0"} {    set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]    set rest [string range $uhost 0 [expr [string last "@" $uhost]-1]]    set ban $rest$host   } {set ban [bnick:masktype $uhost 5]}  }  16 {   set host [string range $uhost [string last "@" $uhost] e]   if {[bnick:findip [string range $host 1 e]] == "0"} {    set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]    set rest "[string range $uhost 0 [expr [string first "!" $uhost]-1]]!*[string trimleft [string range $uhost [expr [string first "!" $uhost]+1] [expr [string last "@" $uhost]-1]] "~"]"    set ban $rest$host   } {set ban [bnick:masktype $uhost 6]}  }  17 {   set host [string range $uhost [string last "@" $uhost] e]   if {[bnick:findip [string range $host 1 e]] == "0"} {    set host [bnick:replace $host "1 ? 2 ? 3 ? 4 ? 5 ? 6 ? 7 ? 8 ? 9 ? 0 ?"]    set rest "[string range $uhost 0 [expr [string first "!" $uhost]-1]]!*"    set ban $rest$host    } {set ban [bnick:masktype $uhost 7]}  }  18 {   set host [string range $uhost [string last "@" $uhost] e]   if {[bnick:findip [string range $host 1 e]] == "0"} {set ban [bnick:masktype $uhost 16]} {set ban [bnick:masktype $uhost 8]}  }  19 {   set host [string range $uhost [string last "@" $uhost] e]   if {[bnick:findip [string range $host 1 e]] == "0"} {set ban [bnick:masktype $uhost 17]} {set ban [bnick:masktype $uhost 9]}  }  return_nothing {set ban ""}  default {set ban "*!*[string range $uhost [string first "@" $uhost] e]"} } set _nick [lindex [split $ban !] 0] set _ident [string range $ban [expr [string first ! $ban]+1] [expr [string last @ $ban]-1]] set _host [string range $ban [expr [string last @ $ban]+1] e] if {$_ident != [set temp [string range $_ident [expr [string length $_ident]-9] e]]} {  set _ident *[string trimleft $temp *] } if {$_host != [set temp [string range $_host [expr [string length $_host]-63] e]]} {  set _host *[string trimleft $temp *] } ; return $_nick!$_ident@$_host}proc bnick:findip {args} { catch {unset bnick_found_ip} if {![string match *.*.*.* $args]} {return 0} foreach arg $args {  if {[string match *.*.*.* $arg]} {   set bnick_testa [split $arg "."] ; set i 0   while {[llength $bnick_testa] != $i} {    set bnick_test [lrange $bnick_testa $i end]    if {[string length [lindex $bnick_test 1]]&lt;4 &amp;&amp; [string length [lindex $bnick_test 2]]&lt;4} {     if {[lindex $bnick_test 1] &lt; 256 &amp;&amp; [lindex $bnick_test 2] &lt; 256 &amp;&amp; [lindex $bnick_test 1] &gt;= 0 &amp;&amp; [lindex $bnick_test 2] &gt;= 0} {      set first "abcdefghi"      if {[string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 1]] &lt;= 9 &amp;&amp; [string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 1]] &gt;= 0} {       set first [string range [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 1] end]       if {[string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 2]] &lt;= 9 &amp;&amp; [string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 2]] &gt;= 0} {        set first [string range [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 2] end]        if {[string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 3]] &lt;= 9 &amp;&amp; [string index [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 3]] &gt;= 0} {         set first [string range [lindex $bnick_test 0] [expr [string length [lindex $bnick_test 0]] - 3] end]        }       }      }      set second [lindex $bnick_test 1] ; set third [lindex $bnick_test 2] ; set fourth "abcdefghi"      if {[string index [lindex $bnick_test 3] 0] &lt;= 9 &amp;&amp; [string index [lindex $bnick_test 3] 0] &gt;= 0} {       set fourth [string index [lindex $bnick_test 3] 0]       if {[string index [lindex $bnick_test 3] 1] &lt;= 9 &amp;&amp; [string index [lindex $bnick_test 3] 1] &gt;= 0} {        set fourth $fourth[string index [lindex $bnick_test 3] 1]        if {[string index [lindex $bnick_test 3] 2] &lt;= 9 &amp;&amp; [string index [lindex $bnick_test 3] 2] &gt;= 0} {         set fourth $fourth[string index [lindex $bnick_test 3] 2]        }       }      }      if {($first &lt; 256) &amp;&amp; ($second &lt; 256) &amp;&amp; ($third &lt; 256) &amp;&amp;          ($fourth &lt; 256) &amp;&amp; ($first &gt; 0) &amp;&amp; ($second &gt; 0) &amp;&amp;          ($third &gt; 0) &amp;&amp; ($fourth &gt; 0) &amp;&amp; ([string index $first 0] &gt; 0) &amp;&amp;          ([string index $second 0] &gt; 0) &amp;&amp; ([string index $third 0] &gt; 0) &amp;&amp;          ([string index $fourth 0] &gt; 0)} {       if {[info exists bnick_found_ip]} {        set bnick_found_ip "$bnick_found_ip $first.$second.$third.$fourth"       } {set bnick_found_ip $first.$second.$third.$fourth}      }     }    } ; incr i +1   }  } } ; if {[info exists bnick_found_ip]} {return $bnick_found_ip} {return 0}}putlog "Bad nick control v3.0 by \002Prince_of_the_net\002 \[Loaded\]"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3368">forever79</a> — Sun Nov 30, 2003 7:57 am</p><hr />
]]></content>
	</entry>
	</feed>
