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

	<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-24T18:46:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[DarkJFMan]]></name></author>
		<updated>2004-06-24T18:46:57-04:00</updated>

		<published>2004-06-24T18:46:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37818#p37818</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37818#p37818"/>
		<title type="html"><![CDATA[invalid command name &quot;elseif&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37818#p37818"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub Caomn|Caomn !flood pub:floodproc pub:flood {nick uhost hand chan text} {   global limit   set limit(number) [expr [llength [chanlist $chan]] -1]   putlog $limit(number)   if {[nick2hand $nick] == "*"} {      putmsg $nick "Sorry, you must be logged in for this command"      return 0 }   if {[botisop $chan] == 0} {      putmsg $chan "Ops are required to enact preventative measures"      return 0 }#Sets the limit command where the number is derived in the main execution   set limit(cmd) "l $limit(number)"#Sets the operator flood modes   set limit(modeop) "i"#Sets the halfop flood modes   set limit(modehalfop) "R$limit(cmd)"   if {[matchattr $hand +aomn $chan] == 1 } {      putquick "MODE +$limit(modeop) $chan" -next      utimer 10 [putserv "MODE -$limit(modeop)"]       } elseif {[matchattr $hand +Cly $chan] == 1 } {      putquick "MODE +$limit(modehalfop) $chan" -next      utimer 10 [putserv "MODE -$limit(modehalfop)"]       } else {       putmsg $chan "It hasnt worked cause summin is wrong. Sod off you silly bastard"      return 0       }   }</code></pre></div>Give this a try.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4261">DarkJFMan</a> — Thu Jun 24, 2004 6:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2004-06-24T11:07:57-04:00</updated>

		<published>2004-06-24T11:07:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37806#p37806</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37806#p37806"/>
		<title type="html"><![CDATA[invalid command name &quot;elseif&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37806#p37806"><![CDATA[
else and elseif aren't commands, they're arguments to the "if" command. The problem is you have your } and your "elseif" and "else" on separate lines. It should be like this:<br><div class="codebox"><p>Code: </p><pre><code>if {blah blah} {   blah   blah} elseif {blah blah} {  blah blah} else {  blah}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Jun 24, 2004 11:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Weirdo]]></name></author>
		<updated>2004-06-24T09:05:31-04:00</updated>

		<published>2004-06-24T09:05:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37800#p37800</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37800#p37800"/>
		<title type="html"><![CDATA[invalid command name &quot;elseif&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37800#p37800"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub Caomn|Caomn !flood pub:floodproc pub:flood {nick uhost hand chan text} {global limitset limit(number) [expr [llength [chanlist $chan]] -1]putlog $limit(number)if {[nick2hand $nick] == "*"} {putmsg $nick "Sorry, you must be logged in for this command"return 0 }if {[botisop $chan] == 0} {putmsg $chan "Ops are required to enact preventative measures"return 0 }#Sets the limit command where the number is derived in the main executionset limit(cmd) "l $limit(number)"#Sets the operator flood modesset limit(modeop) "i"#Sets the halfop flood modesset limit(modehalfop) "R$limit(cmd)"if {[matchattr $hand +aomn $chan] == 1 } {putquick "MODE +$limit(modeop) $chan" -next utimer 10 [putserv "MODE -$limit(modeop)"] } elseif {[matchattr $hand +Cly $chan] == 1 } {putquick "MODE +$limit(modehalfop) $chan" -next utimer 10 [putserv "MODE -$limit(modehalfop)"] }else { putmsg $chan "It hasnt worked cause summin is wrong. Sod off you silly bastard" return 0 }}</code></pre></div>I am trying to make a script that will automatically set a strict limit and then set modes to prevent a part/join flood attack. <br><br>Problem is, i am getting this<br><br>[14:02] Tcl error [pub:flood]: invalid command name "elseif"<br><br>I know Elseif is a command, so is Else, but i have been getting errors for both commands. The bot has been compiled using TCL 8.4.1. I am guessing its syntax, but i am quite stumped. Any help?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1195">Weirdo</a> — Thu Jun 24, 2004 9:05 am</p><hr />
]]></content>
	</entry>
	</feed>
