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

	<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>2025-04-30T22:34:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-04-30T22:34:35-04:00</updated>

		<published>2025-04-30T22:34:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113314#p113314</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113314#p113314"/>
		<title type="html"><![CDATA[Re: badnick advertise kick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113314#p113314"><![CDATA[
thanks CrazyCat<br>the tcl works great ...  final code :<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 {  "*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 2#Set this to the reason to be given while kicking the offender the first time.set bnick_kick "Warning 1 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 2set logo "***-@-badnicks-@-***"################################################################################# You can edit below this but dont mail me if things start acting weird :S  #################################################################################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_type if {$newnick == ""} {set newnick $nick} foreach bword $bnick { if {([string match -nocase *$bword* $newnick])&amp;&amp; [botisop $chan]} {if {![info exists bnicks($uhost)]} {set bnicks($uhost) 1putkick $chan $newnick "$bnick_kick $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... $logo"puthelp "NOTICE $newnick :Join $chan with a bad nick for [expr $bnick_warnings - $bnicks($uhost)] more time(s) and I will make sure you will join no more. $logo"putlog "Warning $bnicks($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 $logo" $bnick_bantimeputkick $chan $newnick "$bnick_ban $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.5 by \002Prince_of_the_net\002 update for Arnold_X-P &amp; CracyCat \[Loaded\]"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Apr 30, 2025 10:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2025-04-30T12:28:56-04:00</updated>

		<published>2025-04-30T12:28:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113312#p113312</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113312#p113312"/>
		<title type="html"><![CDATA[Re: badnick advertise kick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113312#p113312"><![CDATA[
Just search for <strong class="text-strong">bnick(</strong>:<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark-reasonable.min.css"> <strong>script</strong>  <strong>script</strong> <div class="codebox"><pre><code class="language-tcl">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."</code></pre></div> <strong>script</strong> Replace <em class="text-italics">$bnick($uhost)</em> with <strong class="text-strong">$bnicks($uhost)</strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Apr 30, 2025 12:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-04-30T11:25:53-04:00</updated>

		<published>2025-04-30T11:25:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113311#p113311</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113311#p113311"/>
		<title type="html"><![CDATA[Re: badnick advertise kick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113311#p113311"><![CDATA[
thanks CrazyCat.. I can't find your suggestion<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Apr 30, 2025 11:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2025-04-30T03:38:06-04:00</updated>

		<published>2025-04-30T03:38:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113309#p113309</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113309#p113309"/>
		<title type="html"><![CDATA[Re: badnick advertise kick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113309#p113309"><![CDATA[
Because the array is bnicks (with a final "s"), bnick is just your list of bad nicks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Apr 30, 2025 3:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-04-29T23:49:18-04:00</updated>

		<published>2025-04-29T23:49:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113304#p113304</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113304#p113304"/>
		<title type="html"><![CDATA[Re: badnick advertise kick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113304#p113304"><![CDATA[
and it works well because it no longer kicks any nickname, it only kicks bad nicknames<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 {  "*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 3#Set this to the reason to be given while kicking the offender the first time.set bnick_kick "Warning 1 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 2set logo "***backnicks**"################################################################################# You can edit below this but dont mail me if things start acting weird :S  #################################################################################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_type if {$newnick == ""} {set newnick $nick} foreach bword $bnick { if {([string match -nocase *$bword* $newnick])&amp;&amp; [botisop $chan]} {if {![info exists bnicks($uhost)]} {set bnicks($uhost) 1putkick $chan $newnick "$bnick_kick $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... $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 $logo" $bnick_bantimeputkick $chan $newnick "$bnick_ban $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>working well for the moment :<div class="codebox"><p>Code: </p><pre><code>* You were kicked from #BOTSSS by JulieTh (Warning 3 for using bad nicks. Be careful I am watching you... ***backnicks**)</code></pre></div>But in Partyline it gives me this error which I can't solve, can someone help me please?<br><div class="codebox"><p>Code: </p><pre><code>[23:51:21] Tcl error [bnick:check]: can't read "bnick(~somo@6a38-fa78-1825-e6be-dd20.129.190.ip)": variable isn't array</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Tue Apr 29, 2025 11:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2025-04-29T23:19:15-04:00</updated>

		<published>2025-04-29T23:19:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113303#p113303</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113303#p113303"/>
		<title type="html"><![CDATA[badnick advertise kick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113303#p113303"><![CDATA[
I found this TCL in the forum but it has problems, it kicks out whoever enters with a normal one.<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 {  "*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 2#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>errors that were detected in partyline<div class="codebox"><p>Code: </p><pre><code>[23:24:48] Tcl error [bnick:check]: invalid command name "count_update"</code></pre></div>was eliminated [count_update 0] and [count_update 1] so that it does not cause errors<br>and the TCL worked, but I detected another error: any nickname that was not offensive was kicked by the bot.<div class="codebox"><p>Code: </p><pre><code>[23:41] * Now talking in #mundo[23:42] * JulieTh sets mode: +b *!*@6a38-fa78-1825-e6be-dd20.129.190.ip[23:42] * You were kicked by JulieTh (Banned: I think I told you to change ur nick.Now we don't need you. botnick)</code></pre></div><br>The reason why the TCL expelled was this route:<div class="codebox"><p>Code: </p><pre><code>foreach bword [split $bnick "\n"] {if {[regexp -nocase $bword $newnick] &amp;&amp; [botisop $chan]} {</code></pre></div>and change it to:<div class="codebox"><p>Code: </p><pre><code>foreach bword $bnick { if {([string match -nocase *$bword* $newnick])&amp;&amp; [botisop $chan]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Tue Apr 29, 2025 11:19 pm</p><hr />
]]></content>
	</entry>
	</feed>
