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

	<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>2005-04-22T02:01:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Nucleus]]></name></author>
		<updated>2005-04-22T02:01:20-04:00</updated>

		<published>2005-04-22T02:01:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48428#p48428</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48428#p48428"/>
		<title type="html"><![CDATA[Clone Protection Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48428#p48428"><![CDATA[
Yes! It worked, and it’s very fast too. Thank you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5171">Nucleus</a> — Fri Apr 22, 2005 2:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-04-21T18:19:36-04:00</updated>

		<published>2005-04-21T18:19:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48422#p48422</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48422#p48422"/>
		<title type="html"><![CDATA[Clone Protection Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48422#p48422"><![CDATA[
Try this:<div class="codebox"><p>Code: </p><pre><code># Set the next line as the kick msg you want to say set clone_msg "Clones" # Set the next line as the number of clones to scan for set clone_max 3 # Set the next line as the channels you want to run in set clone_chans "#MyChan" proc join_clone {nick uhost hand chan} {  global clone_msg clone_max clone_chans botnick  if {(([lsearch -exact [string tolower $clone_chans] [string tolower $chan]] != -1) || ($clone_chans == "*")) &amp;&amp; (![matchattr $hand m|m $chan]) &amp;&amp; (![matchattr $hand b]) &amp;&amp; ($nick != $botnick)} {   set host [lindex [split $uhost @] 1]   set count 0   foreach i [chanlist $chan] {    if {[string equal -nocase [lindex [split [getchanhost $i $chan] @] 1] $host]} {    incr count    lappend cnicks "$i"   }   }   if {$count &gt;= $clone_max} {    putquick "MODE $chan +b *!*@$host"   foreach cnick $cnicks {    putquick "KICK $chan $cnick :$clone_msg"   }  }  } } bind join - * join_clone</code></pre></div>This should do the job, but if the bot is a clone then it'll kick itself too <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Apr 21, 2005 6:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nucleus]]></name></author>
		<updated>2005-04-21T11:04:41-04:00</updated>

		<published>2005-04-21T11:04:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48410#p48410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48410#p48410"/>
		<title type="html"><![CDATA[Clone Protection Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48410#p48410"><![CDATA[
This is the script after the modifications. Still reacts the same way though. Puts the ban, then kicks itself.<br><div class="codebox"><p>Code: </p><pre><code>#Set the next line as the kick msg you want to say set clone_msg "Clones" #Set the next line as the number of clones to scan for set clone_max 3 #Set the next line as the channels you want to run in set clone_chans "#MyChan" proc join_clone {nick uhost hand chan} {  global clone_msg clone_max clone_chans botnick  if {([lsearch -exact [string tolower $clone_chans] [string tolower $chan]] != -1) || ($clone_chans == "*") &amp;&amp; ![matchattr $hand m|m $chan] &amp;&amp; ![matchattr $hand b] &amp;&amp; ![isbotnick $nick] &amp;&amp; [botisop $chan]} {   set host [lindex [split $uhost @] 1]; set count 0   foreach i [chanlist $chan] {    if {[string equal -nocase $host [lindex [split [getchanhost $i $chan] @] 1]]} {    incr count    }   }   if {$count &gt;= $clone_max} {   putquick "MODE $chan +b *!*@[lindex [split $uhost @] 1]" -next   foreach clone [chanlist $chan] {    if {[string equal -nocase [lindex [split $uhost @] 1] [lindex [split [getchanhost $i $chan] @] 1]]} {     putquick "KICK $chan $clone :$clone_msg" -next     }    }  }  } }putlog "=====&gt;&gt; Clone Protection Loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5171">Nucleus</a> — Thu Apr 21, 2005 11:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-04-21T10:52:01-04:00</updated>

		<published>2005-04-21T10:52:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48409#p48409</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48409#p48409"/>
		<title type="html"><![CDATA[Clone Protection Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48409#p48409"><![CDATA[
It should be this:<br><div class="codebox"><p>Code: </p><pre><code> putquick "MODE $chan +b *!*@[lindex [split $uhost @] 1]" -next </code></pre></div><div class="codebox"><p>Code: </p><pre><code> foreach clone [chanlist $chan] {  if {[string equal -nocase [lindex [split $uhost @] 1] [lindex [split [getchanhost $i $chan] @] 1]]} {   putquick "KICK $chan $clone :$clone_msg" -next   }  }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Thu Apr 21, 2005 10:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nucleus]]></name></author>
		<updated>2005-04-21T10:39:22-04:00</updated>

		<published>2005-04-21T10:39:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48408#p48408</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48408#p48408"/>
		<title type="html"><![CDATA[Clone Protection Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48408#p48408"><![CDATA[
For some reason, when the third clone joins the channel, the bot bans the clone's host, and then kicks itself from the channel....<br><br>[17:36:07] * Joins: clone33 (~<a href="mailto:geek@host.com">geek@host.com</a>)<br>[17:36:07] * eggdropt sets mode: +b *!*@<a href="mailto:geek@host.com">geek@host.com</a><br>[17:36:07] * eggdropt was kicked by eggdropt (Clones)<br>[17:36:15] * Joins: eggdropt (~<a href="mailto:GreekGod@egghost.com">GreekGod@egghost.com</a>)<br><br>kinda funny though <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5171">Nucleus</a> — Thu Apr 21, 2005 10:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-04-21T10:21:30-04:00</updated>

		<published>2005-04-21T10:21:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48407#p48407</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48407#p48407"/>
		<title type="html"><![CDATA[Clone Protection Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48407#p48407"><![CDATA[
Code has been modified, give it a go. By now you should know how to modify the code, for tweaks. I also fixed up your code a bit.<br><div class="codebox"><p>Code: </p><pre><code>#Set the next line as the kick msg you want to sayset clone_msg "Clones"#Set the next line as the number of clones to scan forset clone_max 3#Set the next line as the channels you want to run inset clone_chans "#MyChan"proc join_clone {nick uhost hand chan} { global clone_msg clone_max clone_chans botnick if {([lsearch -exact [string tolower $clone_chans] [string tolower $chan]] != -1) || ($clone_chans == "*") &amp;&amp; ![matchattr $hand m|m $chan] &amp;&amp; ![matchattr $hand b] &amp;&amp; ![isbotnick $nick] &amp;&amp; [botisop $chan]} {  set host [lindex [split $uhost @] 1]; set count 0  foreach i [chanlist $chan] {   if {[string equal -nocase $host [lindex [split [getchanhost $i $chan] @] 1]]} {    incr count   }  }  if {$count &gt;= $clone_max} {  putquick "MODE $chan +b *!*@$host" -next  foreach clone [chanlist $chan] {   if {[string equal -nocase $host [lindex [split [getchanhost $i $chan] @] 1]]} {    putquick "KICK $chan $clone :$clone_msg" -next    }   }  } }}</code></pre></div>Although we can run only 1 loop, remove the second one, in the first one lappend nicks to a list, if not greater unset list, if greater go ahead and kick everyone in the list no need to scan the chanlist again for users matching the mask.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Thu Apr 21, 2005 10:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nucleus]]></name></author>
		<updated>2005-04-21T10:07:18-04:00</updated>

		<published>2005-04-21T10:07:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48406#p48406</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48406#p48406"/>
		<title type="html"><![CDATA[Clone Protection Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48406#p48406"><![CDATA[
<blockquote class="uncited"><div>Or, which would be much better and faster, is to add the nicks into an array on join then kick them when max clones is reached.</div></blockquote>umm...how do i do that?  <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=5171">Nucleus</a> — Thu Apr 21, 2005 10:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-04-21T08:56:40-04:00</updated>

		<published>2005-04-21T08:56:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48400#p48400</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48400#p48400"/>
		<title type="html"><![CDATA[Clone Protection Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48400#p48400"><![CDATA[
you can add this to filter kick<div class="codebox"><p>Code: </p><pre><code>foreach clone [chanlist $chan] {  if {[string match -nocase [maskhost $nick!$uhost] [maskhost [getchanhost $clone $chan]]]} {  puthelp "KICK $chan $clone :$clone_msg" }}</code></pre></div>Or, which would be much better and faster, is to add the nicks into an array on join then kick them when max clones is reached.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Apr 21, 2005 8:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nucleus]]></name></author>
		<updated>2005-04-21T08:15:08-04:00</updated>

		<published>2005-04-21T08:15:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48399#p48399</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48399#p48399"/>
		<title type="html"><![CDATA[Clone Protection Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48399#p48399"><![CDATA[
Well, it allows me to remove the ban, but now, after placing the ban, it only kicks the last clone to enter the channel. Not all of them.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5171">Nucleus</a> — Thu Apr 21, 2005 8:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[avilon]]></name></author>
		<updated>2005-04-21T07:30:18-04:00</updated>

		<published>2005-04-21T07:30:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48396#p48396</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48396#p48396"/>
		<title type="html"><![CDATA[Clone Protection Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48396#p48396"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>putquick "MODE $chan +b [maskhost $nick!$uhost]"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5191">avilon</a> — Thu Apr 21, 2005 7:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nucleus]]></name></author>
		<updated>2005-04-21T03:01:41-04:00</updated>

		<published>2005-04-21T03:01:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48387#p48387</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48387#p48387"/>
		<title type="html"><![CDATA[Clone Protection Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48387#p48387"><![CDATA[
Ok, this is a good clone protection script, i tested it, and as soon as the third clone joins the channel, it puts a ban, and kicks all three of them.<br><div class="codebox"><p>Code: </p><pre><code># Set the next line as the kick msg you want to sayset clone_msg "Clones"# Set the next line as the number of clones to scan forset clone_max 3# Set the next line as the channels you want to run inset clone_chans "#MyChan"proc join_clone {nick uhost hand chan} { global clone_msg clone_max clone_chans botnick if {(([lsearch -exact [string tolower $clone_chans] [string tolower $chan]] != -1) || ($clone_chans == "*")) &amp;&amp; (![matchattr $hand m|m $chan]) &amp;&amp; (![matchattr $hand b]) &amp;&amp; ($nick != $botnick)} {  set host [lindex [split $uhost @] 1]  set count 0  foreach i [chanlist $chan] {   if {[lindex [split [getchanhost $i $chan] @] 1] == $host} { incr count }  }  if {$count &gt;= $clone_max} {   newchanban $chan [maskhost [getchanhost $nick $chan]] $botnick $clone_msg 10min   putserv "KICK $chan $nick :$clone_msg"  } }}bind join - * join_cloneputlog "=====&gt;&gt; Clone Protection Loaded"</code></pre></div>The problem is that it puts the ban in the bot's internal banlist instead of a channel ban. Now, have in mind that i dont know tcl scripting, but, my first guess, would be to replace this line: <div class="codebox"><p>Code: </p><pre><code>newchanban $chan [maskhost [getchanhost $nick $chan]] $botnick $clone_msg 10min</code></pre></div>With this?<div class="codebox"><p>Code: </p><pre><code>putquick "MODE $chan +b $clone_msg"</code></pre></div>Thanks for your help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5171">Nucleus</a> — Thu Apr 21, 2005 3:01 am</p><hr />
]]></content>
	</entry>
	</feed>
