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

	<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>2003-05-08T18:52:45-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Yoda]]></name></author>
		<updated>2003-05-08T18:52:45-04:00</updated>

		<published>2003-05-08T18:52:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=19965#p19965</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=19965#p19965"/>
		<title type="html"><![CDATA[TCL Error in clone detect]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=19965#p19965"><![CDATA[
I adde the line as you said <br><br>######## Here's the added line: <br>         set hand [nick2hand $thisnick $chan] <br><br>and now no more tlc error, thanks a lot  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> <br><br>but still ban both, nick and clone. I dont see where I have to correct to get that only the clone will be banned but not the first user, someone can help?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2083">Yoda</a> — Thu May 08, 2003 6:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Yoda]]></name></author>
		<updated>2003-04-03T16:46:43-04:00</updated>

		<published>2003-04-03T16:46:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18505#p18505</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18505#p18505"/>
		<title type="html"><![CDATA[TCL Error in clone detect]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18505#p18505"><![CDATA[
who know a REALLY good and WORKING clone detector and handler with party line config and commands that works with eggdrop .13?<br><br>I tried all the clone tcls here but noone full work, errors everytime  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2083">Yoda</a> — Thu Apr 03, 2003 4:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-04-02T16:02:30-04:00</updated>

		<published>2003-04-02T16:02:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18455#p18455</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18455#p18455"/>
		<title type="html"><![CDATA[TCL Error in clone detect]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18455#p18455"><![CDATA[
Just a note, I think that part is trying to ge the handle for each nick on the channel, not the original handle. It looks like it kicks people based on a mask, but if the person has certain flags it exempts them. So the handle needs to be looked up for each person.<br><div class="codebox"><p>Code: </p><pre><code>proc kickall { mask chan reason } {   global fastkick   botnick nocloneflag   if {![validchan $chan]} { return "" }   set kicked ""   foreach thisnick [chanlist $chan] {      if {$thisnick == $botnick} { continue }      if {[string match "$mask" "$thisnick![getchanhost $thisnick $chan]"]} {         set dontkick 0         ######## Here's the added line:         set hand [nick2hand $thisnick $chan]         foreach exceptionflag $nocloneflag {            if {[matchattr $hand $exceptionflag|$exceptionflag $chan]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Wed Apr 02, 2003 4:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Yoda]]></name></author>
		<updated>2003-04-02T11:22:20-04:00</updated>

		<published>2003-04-02T11:22:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18448#p18448</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18448#p18448"/>
		<title type="html"><![CDATA[TCL Error in clone detect]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18448#p18448"><![CDATA[
thanks for your answer.<br>Onestly I'm not able to correct the script, maibe I dont understand right what to do, too. You or someone else could be able to correct the script and post it here?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> <br><br>Yoda<br>(too much new)  <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=2083">Yoda</a> — Wed Apr 02, 2003 11:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2003-04-02T04:17:58-04:00</updated>

		<published>2003-04-02T04:17:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18438#p18438</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18438#p18438"/>
		<title type="html"><![CDATA[TCL Error in clone detect]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18438#p18438"><![CDATA[
this error occurs, because the script tries to use a variable called "hand" that is not defined. e.g.<br><div class="codebox"><p>Code: </p><pre><code>proc kickall { mask chan reason } {    global fastkick   botnick nocloneflag    if {![validchan $chan]} { return "" }    set kicked ""    foreach thisnick [chanlist $chan] {       if {$thisnick == $botnick} { continue }       if {[string match "$mask" "$thisnick![getchanhost $thisnick $chan]"]} {          set dontkick 0          foreach exceptionflag $nocloneflag {             if {[matchattr $hand $exceptionflag|$exceptionflag $chan]} { </code></pre></div>in "matchattr $hand" you try to use the variable "hand", but this variable is neither given in the arguments of the function nor is it global nor is it set in the function. on my quick look at the script i noticed one more function with this problem. all i can say so far is: add the "hand" to your function arguments and always call the function with a "hand" given.<div class="codebox"><p>Code: </p><pre><code>proc kickall { mask hand chan reason } { </code></pre></div>and e.g.<div class="codebox"><p>Code: </p><pre><code>set thiskicked [kickall "*!*@$host" $hand $chan "Too many clones from $host"] </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Wed Apr 02, 2003 4:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Yoda]]></name></author>
		<updated>2003-04-01T11:44:22-04:00</updated>

		<published>2003-04-01T11:44:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=18429#p18429</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=18429#p18429"/>
		<title type="html"><![CDATA[TCL Error in clone detect]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=18429#p18429"><![CDATA[
Hi,<br>eggdrop has this error:<br><br>Tcl error [clone_detect]: can't read "hand": no such variable<br><br>this is the script:<div class="codebox"><p>Code: </p><pre><code># -- Configuration ------------------------------------------------------------# "Fast-kick" - If your IRC server allows it, you can kick many people at once# in just one command (I have tried it with 20 kicks on IRCnet). If you think# this works on your irc network, set to "1", if not, set to "0".# Here is what I got by testing on some networks:#   Dalnet   - 0#   Efnet    - 1#   IRCnet   - 1#   Undernet - 0set fastkick 0# Is the whole clone-checking on or off by default?# (use .clonecheck on/off to change while bot is running)set clonecheck 1# Hosts to except from clone-checking, wildcards (?*) allowed:# - hosts which more than one users can use at the same time# - hosts of your "friends" which are neither masters nor bots# - hosts of bots on the channel which have no +b flag# - etc etc# Note: Use HOST, the thing after the users "@"#       e.g.  "yo!yaba@yeba.edu" has host "yeba.edu"set noclonehost {}# People with those flags are never clones: (Separate the list with spaces)# Channel and Global flags are matchedset nocloneflag "b c m"# How many minutes will a clone-host banning lastset clonebantime 2# If this number of clones is reached, bot kicks and bansset maxclone 1# NOTICE other ops (if opped) when ANY clone joins/parts the channel? (0 = no)# (for paranoid people only!)set cloneopnotice 0# -- Script -------------------------------------------------------------------# A little proc to turn console +1 when a +m or +o joins:bind chon - * dcc_onproc dcc_on { hand idx } {  set cons1on 0  foreach chan [channels] {    if {[matchattr $hand m|m $chan] || [matchattr $hand o|o $chan]} {      set cons1on 1    }  }  if {$cons1on} { utimer 1 "console $idx -+1" }  return 0}# Opnotice proc, sends a notice to every op on a channel (if opped)proc opnotice { chan text } {global botnickif {![botisop $chan]} { return 0 }if {$text == ""} { return 0 }# I set maxnicks to send the same NOTICE to maximal 10 nicks at the same# time. Rise it if you want. (I don't know what the maximum IRC-allowed is)set maxnicks 10set oplist ""set curnicks 0foreach thisnick [chanlist $chan] {# don't notice who's not op, the bot itself and other botsif {([isop $thisnick $chan]) &amp;&amp; ($thisnick != $botnick) &amp;&amp; (![matchattr [nick2hand $thisnick $chan] b])} {incr curnicks# Add next oplappend oplist $thisnick# Reached maxnicks?if {$curnicks == $maxnicks} {# Send the text to the current listregsub -all " " $oplist "," oplistputhelp "NOTICE $oplist :$text"# Clean up to begin next blockset curnicks 0set oplist ""}}}if {$oplist != ""} {# still some left to processregsub -all " " $oplist "," oplistputhelp "NOTICE $oplist :$text"}return 1}bind dcc m|m clones dcc_clone_statsbind dcc m|m clonescheck dcc_clonecheckbind dcc m|m clonecheck dcc_clonecheck# Kicks users matching $mask from $chan. Uses "fastkick", if enabled.# Returns a list of kicked users (may not have been executed, because of lag)proc kickall { mask chan reason } {global fastkickbotnick nocloneflagif {![validchan $chan]} { return "" }set kicked ""foreach thisnick [chanlist $chan] {if {$thisnick == $botnick} { continue }if {[string match "$mask" "$thisnick![getchanhost $thisnick $chan]"]} {set dontkick 0foreach exceptionflag $nocloneflag {if {[matchattr $hand $exceptionflag|$exceptionflag $chan]} {set dontkick 1break}}if {$dontkick} { continue }if {[botisop $chan]} {# We only can kick if we are op. But we want to return the list# of "kicked" even if we aren'tif {$fastkick} {lappend knick $thisnicklappend kchan $chan} {putserv "KICK $chan $thisnick :$reason"}}lappend kicked $thisnick}if {$fastkick &amp;&amp; [info exist knick]} {# Dump a KICK-line if it reaches 480 bytesif {[string length "KICK $knick $kchan :$reason"] &gt; 480} {regsub -all " " $knick "," knickregsub -all " " $kchan "," kchanputserv "KICK $kchan $knick :$reason"unset knickunset kchan}}}if {$fastkick &amp;&amp; [info exist knick]} {regsub -all " " $knick "," knickregsub -all " " $kchan "," kchanputserv "KICK $kchan $knick :$reason"}return "$kicked"}# Goes through the channel user list, marking clones. Called 10 secs after a# rehash/restart and 1 min after the bot joins the chanand after the bot is# opped (to kick eventual unkicked clones)proc set_clones { } {global clonelist botnick maxclone fastkickglobal noclonehost nocloneflag clonebantimeif [array exists clonelist] { unset clonelist }foreach chan [channels] {set chan [string tolower $chan]set kicked ""foreach nick [chanlist $chan] {set hand [nick2hand $nick $chan]if {[lsearch -exact $kicked $nick] &gt;= 0} {# This nick was already kickedcontinue}      set host [string tolower [lindex [split [getchanhost $nick $chan] @] 1]]if [info exists clonelist($chan!$host)] {incr clonelist($chan!$host) 1if {$clonelist($chan!$host) &gt;= $maxclone} {newchanban $chan "*!*@$host" $botnick "Clones \($clonelist($chan!$host)\)" $clonebantimeset thiskicked [kickall "*!*@$host" $chan "Too many clones from $host"]set kicked [concat $kicked $thiskicked]putloglev 1 $chan "Max clones reached from $host in $chan: $thiskicked"}continue}set clonelist($chan!$host) 0if {$nick == $botnick} {unset clonelist($chan!$host)}foreach exceptionflag $nocloneflag {if {[matchattr $hand $exceptionflag|$exceptionflag $chan]} {if {[info exists clonelist($chan!$host)]} { unset clonelist($chan!$host) }break}}if {[info exists clonelist($chan!$host)]} {foreach exceptionhost $noclonehost {# remove it, if it is an exceptionif {[string match [string tolower $exceptionhost] [string tolower $host]]} {unset clonelist($chan!$host)break}}}}}}# (i love those 6-level identations...)# Someone joining, check if this host already has someone hereproc clone_detect { nick uhost hand chan } {global clonelist maxclone botnickglobal nocloneflag noclonehost clonebantime cloneopnoticeset chan [string tolower $chan]# It is me joining! Let's rescan the channels list for clones in 1 min!if {$nick == $botnick} {# previous timer exists, kill it, start a new oneforeach this [timers] {if {[string compare [lindex $this 1] "set_clones"] == 0} {killtimer [lindex $this 2]}}timer 1 set_clonesreturn 0}# Someone joining. Check if bot needs to update cloneslist firstforeach this [timers] {if {[string compare [lindex $this 1] "set_clones"] == 0} {# Just relax, I need to refresh the clones-list first...return 0}}foreach exceptionflag $nocloneflag {if {[matchattr $hand $exceptionflag|$exceptionflag $chan]} {return 0}}  set host [string tolower [lindex [split $uhost @] 1]]foreach exceptionhost $noclonehost {# if it is an exception do nothingif {[string match [string tolower $exceptionhost] $host]} {return 0}}if [info exists clonelist($chan!$host)] {incr clonelist($chan!$host) 1if {$clonelist($chan!$host) &gt;= $maxclone} {newchanban $chan "*!*@$host" $botnick "Cloni, espulsi per 5 minuti \($clonelist($chan!$host)\)" $clonebantimeset thiskicked [kickall "*!*@$host" $chan "Too many clones from $host"]putloglev 1 $chan "Max clones reached from $host in $chan: $thiskicked"return 1}foreach nick2 [chanlist $chan] {      set host2 [string tolower [lindex [split [getchanhost $nick2 $chan] @] 1]]if {$host == $host2 &amp;&amp; $nick != $nick2} { lappend clonenicks $nick2 }}regsub -all " " $clonenicks ", " clonenicksif {$cloneopnotice} {opnotice $chan "Clone IN: $nick \($uhost\) is a clone to $clonenicks in $chan"}putloglev 1 $chan "Clone IN $chan: $nick \($uhost\) is clone \#$clonelist($chan!$host) \($clonenicks\)"return 1}set clonelist($chan!$host) 0return 0}proc clone_remove { nick uhost hand chan { rest "" } } {global clonelist botnick cloneopnotice nocloneflag noclonehostset chan [string tolower $chan]if {$nick == $botnick} {return 0}foreach this [timers] {if {[string compare [lindex $this 1] "set_clones"] == 0} {# Just relax, I need to refresh the clones-list first...return 0}}  set host [string tolower [lindex [split $uhost @] 1]]foreach exceptionflag $nocloneflag {if {[matchattr $hand $exceptionflag|$exceptionflag $chan]} {return 0}}foreach exceptionhost $noclonehost {# if it is an exception do nothingif {[string match [string tolower $exceptionhost] [string tolower $host]]} {return 0}}if ![info exists clonelist($chan!$host)] {return 0}if {$clonelist($chan!$host) &lt; 0} {putloglev 1 $chan "Negative number of clones listed?? Something is wrong with the script!"return 0} elseif {$clonelist($chan!$host) == 0} {unset clonelist($chan!$host)return 1} elseif {$clonelist($chan!$host) &gt; 0} {incr clonelist($chan!$host) -1foreach n [chanlist $chan] {      set host2 [string tolower [lindex [split [getchanhost $n $chan] @] 1]]if {($host == $host2) &amp;&amp; ($n != $nick)} { lappend clonenicks $n }}regsub -all " " $clonenicks ", " clonenicksputloglev 1 $chan "Clone OUT $chan: $nick \($uhost\) left \($clonenicks remaining\)"if {$cloneopnotice} {opnotice $chan "Clone OUT: $nick \($uhost\) left $chan \($clonenicks remaining\)"}return 1}}proc clone_kick { nick host hand chan knick rest } {clone_remove $knick [getchanhost $knick $chan] [nick2hand $knick $chan] $chan}proc clone_quit { nick host hand chan rest } {clone_remove $nick $host $hand $chan}proc dcc_clonecheck { hand idx onoff } {global clonecheckset choice [string tolower $onoff]if {$onoff == ""} {if {$clonecheck} { set status "on" } { set status "off" }putdcc $idx "Clone-checking currently \002${status}\002."return 0}if {($choice != "on") &amp;&amp; ($choice != "off")} {putdcc $idx "Usage: '.clonecheck \[on/off\]'"return 0}if {$choice == "on"} {if {$clonecheck == 0} {set clonecheck 1putdcc $idx "Clone-checking is now \002on\002."clonecheckloadreturn 1} {putdcc $idx "Clone-checking was already \002on\002."return 0}} {if {$clonecheck == 1} {set clonecheck 0putdcc $idx "Clone-checking is now \002off\002."clonecheckloadreturn 1} {putdcc $idx "Clone-checking was already \002off\002."return 0}}}proc dcc_clone_stats { hand idx chan } {global clonecheckif {$clonecheck == 0} {putdcc $idx "Sorry, clone-checking currently off. Use \002.clonecheck on\002 to turn it on."return 0}global clonelistif {$chan == ""} {set channel [lindex [console $idx] 0]} {regsub -nocase -all \[{}] $chan "" chanset channel [lindex $chan 0]}putdcc $idx "Clones in $channel:"  set channel [string tolower $channel]foreach addy [array names clonelist] {if {$clonelist($addy) &gt; 0} {scan $addy "%\[^!]!%s" chan hostif {$chan != [string tolower $channel]} { continue }foreach nick [chanlist $chan] {        set host2 [string tolower [lindex [split [getchanhost $nick $chan] @] 1]]if {$host == $host2} { lappend clonenicks $nick}}}if [info exists clonenicks] {regsub -all " " $clonenicks ", " clonenicksset clones($host) $clonenicksunset clonenicks}}if [array exists clones] {set counter 0foreach addy [array names clones] {incr counterputdcc $idx " $counter. $addy \($clones($addy)): $clonelist($channel!$addy)"}unset counter} { putdcc $idx "No clones detected in $channel" }return 1}proc clonecheckload {} {global clonecheck clonelist clone_loadedif {$clonecheck} {# When activated, make all binds, and refresh clones-arraybind join - * clone_detectbind part - * clone_removebind sign - * clone_quitbind kick - * clone_kickbind splt - * clone_removebind rejn - * clone_detectset clone_loaded 1# begins in 10 secs (not ON rehash, cause chan-userlist is not ok yet)# if bot was restarted, set_clones is called 1 min after bot joins chan# (see clone_detect)utimer 10 set_clones} {# When not activated, remove all bindings and clean the clonelist from memif {$clone_loaded} {unbind join - * clone_detectunbind part - * clone_removeunbind sign - * clone_quitunbind kick - * clone_kickunbind splt - * clone_removeunbind rejn - * clone_detect}set clone_loaded 1if {[array exists clonelist]} { unset clonelist }}}global clone_loadedset clone_loaded 0clonecheckloadif {$clonecheck} { set clonestatus "on" } { set clonestatus "off" }putlog "- Clone detection v3.5 \($clonestatus\) by By-Tor, Ernst &amp; Flash."putlog "  Max clones allowed: $maxclone. Banning for $clonebantime mins."unset clonestatus</code></pre></div>can someone help me to resolve it? I checked many times but I dont see where error is. the script work ok apart this error that get both nicks banned instead to ban only the clone.<br><br>thanks a lot<br><br>Yoda <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2083">Yoda</a> — Tue Apr 01, 2003 11:44 am</p><hr />
]]></content>
	</entry>
	</feed>
