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

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2004-06-25T04:23:25-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-06-25T04:23:25-04:00</updated>

		<published>2004-06-25T04:23:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37846#p37846</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37846#p37846"/>
		<title type="html"><![CDATA[Extra words after &quot;else&quot; clause in &quot;if&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37846#p37846"><![CDATA[
Hi,<br><br>I have this script it is a clone detector and a channel locker script.<br>I am having problems with else and if statements, if someone could<br>help me with the error it would be greatful.<br><div class="codebox"><p>Code: </p><pre><code>Tcl error [clonejoin]: wrong # args: extra words after "else" clause in "if" command</code></pre></div><div class="codebox"><p>Code: </p><pre><code>bind join - * clonejoinproc clonejoin {nick uhost hand chan} {global cp_chans cp_j_flood cp_jp_flood cp_btime cp_host_count cp_uh_count clonebantimeset uhost [string tolower $uhost]set host [lindex [split $uhost @] 1]set chan [string tolower $chan]      set banmask "*!*@[lindex [split $uhost @] 1]"set joinpartsplit [lindex [split $cp_j_flood ":"] 0]; set joinparttimes [lindex $joinpartsplit 0]; set joinpartsecs [lindex $joinpartsplit 1]  if {(([lsearch -exact [split [string tolower $cp_chans]] [string tolower $chan]] == -1) || ($cp_chans == "*"))} {return 0}if {![info exists cp_host_count($host:$chan)]} {set cp_host_count($host:$chan) 1} else {incr cp_host_count($host:$chan)}utimer [lindex $cp_j_flood 1] [list cp_expire cp_host_count($host:$chan)]if {$cp_host_count($host:$chan) &gt; [lindex $cp_j_flood 0]} { newchanban $chan *!*@$host clones "2(Excessive Clones 12from:6 *!*@$host2)" 30    if {[botisop $chan]} {       enforce:flood:mlock $chan  putquick "KICK $chan $nick :2(Excessive Clones 12from:6 *!*@$host2)" -next             utimer 1 [list scan:remove:clones $banmask $host $nick $chan]  }    }if {![info exists cp_uh_count($uhost:$chan)]} {set cp_uh_count($uhost:$chan) 1} else {incr cp_uh_count($uhost:$chan)}utimer [lindex $cp_jp_flood 1] [list cp_expire cp_uh_count($uhost:$chan)]if {$cp_uh_count($uhost:$chan) &gt;= [expr [lindex $cp_jp_flood 0]*2]} { newchanban $chan *!*@$host clones "2(Excessive Clones 12from:6 *!*@$host2)" 30    if {[botisop $chan]} {enforce:flood:mlock $chan; set list [list]      putquick "KICK $chan $nick :2(Excessive Clones 12from:6 *!*@$host2)" -nextforeach user [chanlist $chan] {       if {[string equal -nocase $user $nick]} { continue }       if {[string match -nocase $banmask "${nick}![getchanhost $user $chan]"]} { lappend list $user } }      putquick "KICK $chan [join $list {,}] :0,1 Mass Join/Part Flood Kick 12,0 - 12Detected 2multiple 12clients cycling in here with the 2host6 $banmask 12performing2 $joinparttimes 12or more2 join/part cycles,12 in less than2 $joinpartsecs secs." -next      timer $clonebantime "pushmode $chan -b *!*@$host"            }}}proc enforce:flood:mlock {chan} { global botnick allmodes mlockswitch mlock mlock1 mlock2 noticeswitch clonenotice mlockremove  set checkmode [split [string trim [lindex [split [getchanmode $chan]] 0] "+"] ""]  if {($mlockswitch == 1) &amp;&amp; ($mlock != "") &amp;&amp; ((![string match *$checkmode* *$allmodes*]) || (![string match *$checkmode* $mlock]) || (![string match *$checkmode* $mlock1]) || (![string match *$checkmode* $mlock2]))} {   putquick "MODE $chan +$allmodes" -next; set modeslocked 1   }   if {($noticeswitch == 1) &amp;&amp; ($clonenotice != "")} {     putquick "NOTICE $chan :$clonenotice"     }   if {($mlockremove == "") || ($mlockremove == "0") || ($mlockremove &lt; "1")} { set $mlockremove 10 }  utimer $mlockremove [list remove:flood:mlock $chan]  return 1}proc remove:flood:mlock {chan} { global botnick allmodes mlock mlock1 mlock2  set checknewmode [split [string trim [lindex [split [getchanmode $chan]] 0] "+"] ""]  if {($mlock1 == "")} { set mlock1 $mlock }; if {($mlock2 == "")} { set mlock2 $mlock }   if {([string match *$checknewmode* *$allmodes*]) || ([string match *$checknewmode* $mlock]) || ([string match *$checknewmode* $mlock1]) || ([string match *$checknewmode* $mlock2])} {    putserv "MODE $chan -$allmodes"    return 1    }}proc scan:remove:clones {banmask host nick chan} { global botnick clonebantime  set list [list]  foreach user [chanlist $chan] {   if {[string equal -nocase $user $nick]} {continue}   if {[string match -nocase $banmask "${nick}![getchanhost $user $chan]"]} { lappend list $user }   }  putquick "KICK $chan [join $list ,] :0,1 Excessive Clone/Botnet Join Kick 2,0 - (Excessive Clones 12from host:6 *!*@$host2)" -next  timer $clonebantime "pushmode $chan -b *!*@$host" return 1}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Fri Jun 25, 2004 4:23 am</p><hr />
]]></content>
	</entry>
	</feed>
