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

	<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>2020-09-24T20:46:32-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-09-24T20:46:32-04:00</updated>

		<published>2020-09-24T20:46:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109038#p109038</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109038#p109038"/>
		<title type="html"><![CDATA[CloneScanner Showing Too Many results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109038#p109038"><![CDATA[
That worked great caesar, cheers <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Thu Sep 24, 2020 8:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-08-18T11:15:53-04:00</updated>

		<published>2020-08-18T11:15:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108886#p108886</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108886#p108886"/>
		<title type="html"><![CDATA[CloneScanner Showing Too Many results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108886#p108886"><![CDATA[
Oh, forgot about this post heh, i'll try the fixed version and report back<br><br>Cheers in advanced caesar  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Tue Aug 18, 2020 11:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2020-05-26T08:53:06-04:00</updated>

		<published>2020-05-26T08:53:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108479#p108479</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108479#p108479"/>
		<title type="html"><![CDATA[CloneScanner Showing Too Many results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108479#p108479"><![CDATA[
Simple typo.  <br>Look for where the variable is set.<br>See the difference in: kicklist and kickList .<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue May 26, 2020 8:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-05-26T07:45:09-04:00</updated>

		<published>2020-05-26T07:45:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108478#p108478</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108478#p108478"/>
		<title type="html"><![CDATA[CloneScanner Showing Too Many results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108478#p108478"><![CDATA[
getting this error <br><div class="codebox"><p>Code: </p><pre><code>Tcl error [::clonescan::clonescan]: can't read "skip": no such variable</code></pre></div>also not sure if this helps but..<br><br><a href="http://paste.tclhelp.net/?id=6jeu" class="postlink">http://paste.tclhelp.net/?id=6jeu</a><br><br>would that error cause a problem?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Tue May 26, 2020 7:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-05-26T10:49:39-04:00</updated>

		<published>2020-05-26T05:57:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108477#p108477</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108477#p108477"/>
		<title type="html"><![CDATA[CloneScanner Showing Too Many results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108477#p108477"><![CDATA[
Untested code:<div class="codebox"><p>Code: </p><pre><code>namespace eval clonescan {set trigger "!"set ghz "1"     set skip { "S" "Q" }bind pub -|- "${trigger}clones" [namespace current]::clonescanproc checknick {nick} {variable skipset test [expr {[lsearch -nocase $skip $nick] &gt; -1 ? "1" : "0"}]}   proc clonescan {nick uhost hand chan text} {global ghzputhelp "NOTICE $nick :Starting clonescan for $chan..."foreach user [chanlist $chan] {if {[checknick $user] || [isbotnick $user]} continueset host [lindex [split [getchanhost $user $chan] @] 1]lappend clones($host) $user}switch -- $ghz {0 {foreach host [array names clones] {set len [llength $clones($host)]if {$len &gt; 1} {set nickList [join [join $clones($host)] ", "]puthelp "NOTICE $nick :\($host\) Nick list: $nickList - Clones: [expr $len - 1]"incr count $len}}}1 {set kickList {}set banList {}foreach host [array names clones] {set len [llength $clones($host)]if {$len &gt; 1} {lappend kickList [join $clones($host)]lappend banList "*!*@$host"}}stackBans $chan $banListstackKicks $chan $kicklist "We don't like clones."}default { return }}}proc stackBans {chan banlist} {set max 25set count [llength $banlist]while {$count &gt; 0} {if {$count&gt; $max} {set mode [string repeat "b" $max]set masks [join [lrange $banlist 0 [expr {$max - 1}]]]set banlist [lrange $banlist $max end]incr count -$maxincr total $max } else {set mode [string repeat "b" $count]set masks [join $banlist]incr total $countset count 0}puthelp "MODE $chan +$mode $masks"}   }      proc stackKicks {chan kicklist reason} {set max 25set count [llength $kicklist]while {$count &gt; 0} {if {$count &gt; $max} {set users [join [lrange $kicklist 0 [expr {$max - 1}]] ","]set kicklist [lrange $kicklist $max end]incr count -$max} else {set users [join $kicklist ","]set count 0}puthelp "KICK $chan $users :$reason"}}}</code></pre></div>Typo fixed.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue May 26, 2020 5:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-05-25T22:05:32-04:00</updated>

		<published>2020-05-25T22:05:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108476#p108476</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108476#p108476"/>
		<title type="html"><![CDATA[CloneScanner Showing Too Many results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108476#p108476"><![CDATA[
now i tried to edit the clonescanner you gave me and here's as far as i got so far<br><div class="codebox"><p>Code: </p><pre><code>       set trigger "!"              set ghz "1"              bind pub -|- "${trigger}clones" [namespace current]::clonescan                  proc clonescan {nick uhost hand chan text} {          global ghz          puthelp "NOTICE $nick :Starting clonescan for $chan..."          set start [clock clicks]          foreach user [chanlist $chan] {             if {[checknick $user] || [isbotnick $user]} continue                set host [lindex [split [getchanhost $user $chan] @] 1]                lappend clones($host) $user          }          set total 0          set count 0          if {$ghz == "0"} {           foreach host [array names clones] {             set len [llength $clones($host)]             if {$len &gt; 1} {                set nickList [join [join $clones($host)] ", "]                puthelp "NOTICE $nick :\($host\) Nick list: $nickList - Clones: [expr $len - 1]"              }             if {$ghz == "1"} {            foreach cloneXz $nickList {putnow "kick $chan $cloneXz"}          }                incr count $len             }             incr total $len  }}</code></pre></div>not sure if you see what i'm trying to do, but i hope you can help me out what i'm doing wrong <br><br>if i set<br><div class="codebox"><p>Code: </p><pre><code>set ghz "1"</code></pre></div>it privmsg's me of the clones which is good but when i set it to 0 it just stays at<br><br>-Techy- Starting clonescan for ###789...<br><br>so not sure what i'm doing wrong hehe cheers <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>and after i get this going i will tidy the script up hehe<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Mon May 25, 2020 10:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-05-25T10:34:58-04:00</updated>

		<published>2020-05-25T10:34:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108470#p108470</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108470#p108470"/>
		<title type="html"><![CDATA[CloneScanner Showing Too Many results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108470#p108470"><![CDATA[
yeah i do like the percentage thing thats cool<br>so i'll keep it<br><br>what i want is for me to be able to set two options<br><br>to scan for clones and if over set amount privmsg me <br><br>and for the other option<br> <br><br>to simply kickban all clones if over set amount <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>and also dont want this script to scan for clones when they join, i want this script to simply only activate on command <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Mon May 25, 2020 10:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-05-25T09:35:13-04:00</updated>

		<published>2020-05-25T09:35:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108467#p108467</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108467#p108467"/>
		<title type="html"><![CDATA[CloneScanner Showing Too Many results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108467#p108467"><![CDATA[
In the original topic first was considered "human" and the second one was the clone, hence the numbers says 1 clone.<br><br>Anyway, so, basically you want on-command to scan and punish clones if are more than specified amount? I've linked to this old code cos I found the percentage interesting. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon May 25, 2020 9:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-05-25T07:26:10-04:00</updated>

		<published>2020-05-25T07:26:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108462#p108462</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108462#p108462"/>
		<title type="html"><![CDATA[CloneScanner Showing Too Many results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108462#p108462"><![CDATA[
Alright so i tested the script you provided me and here is the results.<br><div class="codebox"><p>Code: </p><pre><code>&lt;Techy&gt; Starting clonescan for ##computertech123...&lt;Techy&gt; (bitcoinshell.mooo.com) Nick list: Kai, BLACK - Clones: 1&lt;Techy&gt; (unaffiliated/computertech) Nick list: CT123, ComputerTech - Clones: 1&lt;Techy&gt; Clones: 4 (12.1%) | Real users: 29 (87.9%) | Took: 0.427ms.</code></pre></div>seems to work pretty good <br><br><br>my not need the percentage info %  <br><br>but it seems awesome <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>maybe this would need changed<div class="codebox"><p>Code: </p><pre><code>&lt;Techy&gt; (bitcoinshell.mooo.com) Nick list: Kai, BLACK - Clones: 1</code></pre></div><div class="codebox"><p>Code: </p><pre><code>since there was Two clones the results would need to be Clones: 2</code></pre></div>prehaps we could change that to my liking hehe <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>and add a punishment as you mentioned above<br><br>also cheers caesar in advanced appreciate your help <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Mon May 25, 2020 7:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2020-05-25T00:45:57-04:00</updated>

		<published>2020-05-25T00:45:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108461#p108461</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108461#p108461"/>
		<title type="html"><![CDATA[CloneScanner Showing Too Many results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108461#p108461"><![CDATA[
See if this taken from another topic (<a href="http://forum.egghelp.org/viewtopic.php?t=20429" class="postlink">link</a>) works:<div class="codebox"><p>Code: </p><pre><code>namespace eval clonescan {   variable trigger "."      bind pub m|o "${trigger}clone" [namespace current]::clonescan   bind pub m|o "${trigger}clones" [namespace current]::clonescan      proc checknick {nick} {      set skip [list "S" "Q"]      set test [expr {[lsearch -nocase $skip $nick] &gt; -1 ? "1" : "0"}]   }   proc clonescan {nick uhost hand chan text} {      puthelp "PRIVMSG $chan :Starting clonescan for $chan..."      set start [clock clicks]      foreach user [chanlist $chan] {         if {[checknick $user] || [isbotnick $user]} continue            set host [lindex [split [getchanhost $user $chan] @] 1]            lappend clones($host) $user      }      set total 0      set count 0      foreach host [array names clones] {         set len [llength $clones($host)]         if {$len &gt; 1} {            set nickList [join [join $clones($host)] ", "]            puthelp "PRIVMSG $chan :\($host\) Nick list: $nickList - Clones: [expr $len - 1]"            incr count $len         }         incr total $len      }      set p(c) [expr {$total &gt; 0 ? [format %.1f [expr ($count.0 * 100.0) / $total.0]] : "0.0"}]       set p(u) [expr (100.0 - $p(c))]      set end [clock clicks]      puthelp "PRIVMSG $chan :Clones: $count ($p(c)%) | Real users: [expr ($total - $count)] ($p(u)%) | Took: [expr ($end-$start)/1000.0]ms."   }}</code></pre></div>and we can add the punishment later.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon May 25, 2020 12:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ComputerTech]]></name></author>
		<updated>2020-05-24T21:19:17-04:00</updated>

		<published>2020-05-24T21:19:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108460#p108460</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108460#p108460"/>
		<title type="html"><![CDATA[CloneScanner Showing Too Many results]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108460#p108460"><![CDATA[
Hello all me and my friend made this script it's a simple clonescanner that has two options pm/notices the user of what clones there is or simply kickbans the clones so far it's been good, but there is a problem once the clones are kickbanned i remove the ban and make the clone return the bot kicks the clone right away without me typing !clonescan <br><br>Geo on freenode #eggdrop told me to put this line<br><div class="codebox"><p>Code: </p><pre><code>putlog $cloneslist</code></pre></div>before the kick and it gave these results<br><br><a href="http://paste.tclhelp.net/?id=6jd6" class="postlink">http://paste.tclhelp.net/?id=6jd6</a><br><br>by the way my two test clones are kai and black<br><br>so here is the script<br><br><br><div class="codebox"><p>Code: </p><pre><code>set sect "1"namespace eval ::CloneScan {bind pub o|o !clonescan ::CloneScan::clonescanproc areClones { user other chan } {if {$user == $other} {return 0}if {[getchanhost $user $chan] == [getchanhost $other $chan]} {return 1}return 0}proc listClones { user chan } {set clones {}foreach other [chanlist $chan] {if {[areClones $user $other $chan]} {lappend clones $other}}if {[llength $clones]} {lappend clones $user}return $clones ;}proc clonescan {nick host hand chan arg} {global sectset userlist [chanlist $chan]set cloneslist {}set banlist {}foreach user $userlist {# if user has been detected as clone before, no need to check again!if {[lsearch -exact $cloneslist $user] != -1} {continue}set clones [listClones $user $chan]foreach clone $clones {lappend cloneslist $clone}lappend banlist [lindex $clones 0]}if {$sect == "1"} {foreach nik $banlist {set uhost [getchanhost $nick $chan]set mask $hostforeach nick $cloneslist {putlog $cloneslist                               pushmode $chan +b $host; after 200 putkick $chan $nick &lt;3                           }}}if {$sect == "0"} {set realusers {}foreach user $userlist {if {[lsearch -exact $cloneslist $user] == -1} {lappend realusers $user}}set numreal [llength $realusers]set numclones [llength $cloneslist]putserv "PRIVMSG $chan :CloneScan: There are $numreal real users on $chan ($numclones clones found)."putserv "PRIVMSG $chan :CloneScan: The clones are: [join $cloneslist]"}}} ;#end namspace CloneScan</code></pre></div>cheers all who help me with this in advanced <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12849">ComputerTech</a> — Sun May 24, 2020 9:19 pm</p><hr />
]]></content>
	</entry>
	</feed>
