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

	<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-07-05T01:47:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2005-07-05T01:47:57-04:00</updated>

		<published>2005-07-05T01:47:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51793#p51793</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51793#p51793"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51793#p51793"><![CDATA[
My god, Are you still too stupid to test your own scripts?<br><br>And, Use the [censored] edit button. There is no need to see all these posts from you when it was you who made the last reply anyway.<br><br>Test your OWN scripts, FIND out if there is something wrong.<br>THEN if you absolutely can't fix it ask us what the problem could be and ALWAYS include the error message.<br><br>Don't simply go around asking us if every brace you add is correct. There is also no need to make so much posts all containing the same code that is just slightly altered, Try the edit button for once.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Tue Jul 05, 2005 1:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-04T14:28:33-04:00</updated>

		<published>2005-07-04T14:28:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51773#p51773</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51773#p51773"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51773#p51773"><![CDATA[
oki. I did fixed the script. I didnt delete all the if {[$bla != "bla"]} because i thought if i delete it, people could type 1/2/3/4/5 instaed of 5on5 or 3on3 etc and then the script will be useless. Oh well. Heres the new script. Can you check i have done what you said correct Sir_Fz please. <br><div class="codebox"><p>Code: </p><pre><code>proc cup:start {nick host hand chan text} {  if {[matchattr $hand |C $chan]} {    if {[channel get $chan "cup"]} {      putserv "PRIVMSG $chan :Error: Cup is already running."    }    } else {    set cup(slots,$chan) [lindex [split $text] 1]    set cup(type,$chan) [lindex [split $text] 0]    set cup(prize,$chan) [join [lrange [split $text] 2 end]]    if {($cup(type,$chan) != "5on5") &amp;&amp; ($cup(type,$chan) != "4on4") &amp;&amp; ($cup(type,$chan) != "3on3") &amp;&amp; ($cup(type,$chan) != "2on2") &amp;&amp; ($cup(type,$chan) != "1on1") &amp;&amp; ($cup(type,$chan) == "")} {      putserv "NOTICE $nick :Error: Please enter a correct cup type. ( 5on5 or 4on4 or 3on3 or 2on2 or 1on1 )"      } else {      if {($cup(slots,$chan) != "4") &amp;&amp; ($cup(slots,$chan) != "8") &amp;&amp; ($cup(slots,$chan) != "16") &amp;&amp; ($cup(slots,$chan) != "32") &amp;&amp; ($cup(slots,$chan) == "")} {        putserv "NOTICE $nick :Error: Please enter a correct slot entry. ( 4 or 8 or 16 or 32 )"        } else {        if {($cup(prize,$chan) == "")} {          putserv "NOTICE $nick Error: Please enter a prize. ( prize can be anything )"          } else {          channel set $chan +cup          channel set $chan s_cup_slots $cup(slots,$chan)           channel set $chan s_cup_type $cup(type,$chan)           channel set $chan s_cup_prize $cup(prize,$chan)           channel set $chan s_cup_teams 0          channel set $chan s_cup_admin $nick          channel set $chan s_cup_HLTV None set          channel set $chan s_cup_maps de_dust2          putserv "PRIVMSG $chan :The $chan [channel get $chan "s_cup_type"] is now on with [channel get $chan "s_cup_slots"] slots."          putserv "PRIVMSG $chan :Your admin is [channel get $chan "s_cup_admin"] and the map is [channel get $chan "s_cup_maps"]."          putserv "PRIVMSG $chan :Bot by #cupcentrum join to request your bot."          } else {          if {![matchattr $hand |C $chan]} {            putserv "NOTICE $nick :Error: you do not have access to this command."          }           }      }    }     }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Mon Jul 04, 2005 2:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-04T13:35:33-04:00</updated>

		<published>2005-07-04T13:35:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51765#p51765</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51765#p51765"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51765#p51765"><![CDATA[
oki, ill fix it. Thanks Sir_Fz<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Mon Jul 04, 2005 1:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-03T19:29:22-04:00</updated>

		<published>2005-07-03T19:29:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51731#p51731</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51731#p51731"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51731#p51731"><![CDATA[
Ok for starters:<div class="codebox"><p>Code: </p><pre><code>if {($bla != "bla") &amp;&amp; ($bla != "bla1") &amp;&amp; ($bla != "bla2") &amp;&amp; ($bla == "")} {</code></pre></div>is the same as<div class="codebox"><p>Code: </p><pre><code>if {$bla == ""} {</code></pre></div>and <div class="codebox"><p>Code: </p><pre><code>if {[something]} { # bla} elseif {![something]} { # bla}</code></pre></div>is the same as<div class="codebox"><p>Code: </p><pre><code>if {[something]} { # bla} else { # bla}</code></pre></div>Also you can't use two consecutive elses. i.e<div class="codebox"><p>Code: </p><pre><code>if {[foo]} { # bla} else { # bli} else { # blo}</code></pre></div>is wrong, it's either if-else, if-elseif or if-elseif-else (and you can specify as much elseifs as you want).<br>Try to fix these out, and let's see what happens then.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Jul 03, 2005 7:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-03T09:57:39-04:00</updated>

		<published>2005-07-03T09:57:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51721#p51721</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51721#p51721"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51721#p51721"><![CDATA[
ok, here we are Sir_Fz the script is sorted and ready for you<br><div class="codebox"><p>Code: </p><pre><code>proc cup:start {nick host hand chan text} {  if {[matchattr $hand |C $chan]} {    if {[channel get $chan "cup"]} {      putserv "PRIVMSG $chan :Error: Cup is already running."      } elseif {![channel get $chan "cup"]} {      set cup(slots,$chan) [lindex [split $text] 1]      set cup(type,$chan) [lindex [split $text] 0]      set cup(prize,$chan) [join [lrange [split $text] 2 end]]      if {($cup(type,$chan) != "5on5") &amp;&amp; ($cup(type,$chan) != "4on4") &amp;&amp; ($cup(type,$chan) != "3on3") &amp;&amp; ($cup(type,$chan) != "2on2") &amp;&amp; ($cup(type,$chan) != "1on1") &amp;&amp; ($cup(type,$chan) == "")} {        putserv "NOTICE $nick :Error: Please enter a correct cup type. ( 5on5 or 4on4 or 3on3 or 2on2 or 1on1 )"        } elseif {($cup(slots,$chan) != "4") &amp;&amp; ($cup(slots,$chan) != "8") &amp;&amp; ($cup(slots,$chan) != "16") &amp;&amp; ($cup(slots,$chan) != "32") &amp;&amp; ($cup(slots,$chan) == "")} {        putserv "NOTICE $nick :Error: Please enter a correct slot entry. ( 4 or 8 or 16 or 32 )"        } elseif {($cup(prize,$chan) == "")} {        putserv "NOTICE $nick Error: Please enter a prize. ( prize can be anything )"        } else {        channel set $chan +cup        channel set $chan s_cup_slots $cup(slots,$chan)         channel set $chan s_cup_type $cup(type,$chan)         channel set $chan s_cup_prize $cup(prize,$chan)         channel set $chan s_cup_teams 0        channel set $chan s_cup_admin $nick        channel set $chan s_cup_HLTV None set        channel set $chan s_cup_maps de_dust2        putserv "PRIVMSG $chan :The $chan [channel get $chan "s_cup_type"] is now on with [channel get $chan "s_cup_slots"] slots."        putserv "PRIVMSG $chan :Your admin is [channel get $chan "s_cup_admin"] and the map is [channel get $chan "s_cup_maps"]."        putserv "PRIVMSG $chan :Bot by #cupcentrum join to request your bot."        } else {        putserv "NOTICE $nick :Error: you do not have access to this command."      }       }  }}   </code></pre></div>i sorted out the layout.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sun Jul 03, 2005 9:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-02T19:30:08-04:00</updated>

		<published>2005-07-02T19:30:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51687#p51687</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51687#p51687"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51687#p51687"><![CDATA[
ok. Thanks Sir_Fz ill do that tomorrow<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sat Jul 02, 2005 7:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-02T18:56:33-04:00</updated>

		<published>2005-07-02T18:56:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51685#p51685</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51685#p51685"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51685#p51685"><![CDATA[
No, I'm saying write your code in a good format so we would want to help you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Jul 02, 2005 6:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-02T16:10:11-04:00</updated>

		<published>2005-07-02T16:10:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51677#p51677</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51677#p51677"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51677#p51677"><![CDATA[
ok. But Sir_Fz i dont understand. What is the error. Are you saying its a layout error, bracket error or script error?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sat Jul 02, 2005 4:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-02T15:49:58-04:00</updated>

		<published>2005-07-02T15:49:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51676#p51676</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51676#p51676"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51676#p51676"><![CDATA[
First, try to have a nice format in your scripts. Read this <a href="http://forum.egghelp.org/viewtopic.php?t=9559#49114" class="postlink">post</a> from the 'Tip of the day' topic.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Jul 02, 2005 3:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-02T15:17:06-04:00</updated>

		<published>2005-07-02T15:17:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51675#p51675</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51675#p51675"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51675#p51675"><![CDATA[
so, whats the error then Sir_Fz if you dont mind helping me ;p<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sat Jul 02, 2005 3:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-02T14:07:23-04:00</updated>

		<published>2005-07-02T14:07:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51673#p51673</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51673#p51673"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51673#p51673"><![CDATA[
Actually, that would return 1 if you have a global C flag or a $chan C flag. (the first if statement)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Jul 02, 2005 2:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-02T13:43:32-04:00</updated>

		<published>2005-07-02T13:43:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51672#p51672</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51672#p51672"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51672#p51672"><![CDATA[
i think i found the error:<br><div class="codebox"><p>Code: </p><pre><code>if {[matchattr $hand C|C $chan]} { </code></pre></div>should be<br><div class="codebox"><p>Code: </p><pre><code>if {[matchattr $hand |C $chan]} { </code></pre></div>Otherwise it means you need global and channel flag +C<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sat Jul 02, 2005 1:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[YooHoo]]></name></author>
		<updated>2005-07-02T12:42:53-04:00</updated>

		<published>2005-07-02T12:42:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51671#p51671</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51671#p51671"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51671#p51671"><![CDATA[
<blockquote class="uncited"><div>Also, can anyone tell me why this script says i have no access, even when i have given myself the global and channel +C flag for cupadmin.</div></blockquote>does the bot recognizes your hostmask?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2706">YooHoo</a> — Sat Jul 02, 2005 12:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-02T10:19:54-04:00</updated>

		<published>2005-07-02T10:19:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51662#p51662</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51662#p51662"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51662#p51662"><![CDATA[
Also, can anyone tell me why this script says i have no access, even when i have given myself the global and channel +C flag for cupadmin.<br><div class="codebox"><p>Code: </p><pre><code>proc cup:start {nick host hand chan text} {if {[matchattr $hand C|C $chan]} {if {[channel get $chan "cup"]} {putserv "PRIVMSG $chan :Error: Cup is already running."} elseif {![channel get $chan "cup"]} {set cup(slots,$chan) [lindex [split $text] 1]set cup(type,$chan) [lindex [split $text] 0]set cup(prize,$chan) [join [lrange [split $text] 2 end]]if {($cup(type,$chan) != "5on5") &amp;&amp; ($cup(type,$chan) != "4on4") &amp;&amp; ($cup(type,$chan) != "3on3") &amp;&amp; ($cup(type,$chan) != "2on2") &amp;&amp; ($cup(type,$chan) != "1on1") &amp;&amp; ($cup(type,$chan) == "")} {putserv "NOTICE $nick :Error: Please enter a correct cup type. ( 5on5 or 4on4 or 3on3 or 2on2 or 1on1 )"} elseif {($cup(slots,$chan) != "4") &amp;&amp; ($cup(slots,$chan) != "8") &amp;&amp; ($cup(slots,$chan) != "16") &amp;&amp; ($cup(slots,$chan) != "32") &amp;&amp; ($cup(slots,$chan) == "")} {putserv "NOTICE $nick :Error: Please enter a correct slot entry. ( 4 or 8 or 16 or 32 )"} elseif {($cup(prize,$chan) == "")} {putserv "NOTICE $nick Error: Please enter a prize. ( prize can be anything )"} else {channel set $chan +cupchannel set $chan s_cup_slots $cup(slots,$chan) channel set $chan s_cup_type $cup(type,$chan) channel set $chan s_cup_prize $cup(prize,$chan) channel set $chan s_cup_teams 0channel set $chan s_cup_admin $nickchannel set $chan s_cup_HLTV None setchannel set $chan s_cup_maps de_dust2putserv "PRIVMSG $chan :The $chan [channel get $chan "s_cup_type"] is now on with [channel get $chan "s_cup_slots"] slots."putserv "PRIVMSG $chan :Your admin is [channel get $chan "s_cup_admin"] and the map is [channel get $chan "s_cup_maps"]."putserv "PRIVMSG $chan :Bot by #cupcentrum join to request your bot."} else {putserv "NOTICE $nick :Error: you do not have access to this command."}   }}} </code></pre></div>Thanks in advance!!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sat Jul 02, 2005 10:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-07-02T09:44:21-04:00</updated>

		<published>2005-07-02T09:44:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51657#p51657</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51657#p51657"/>
		<title type="html"><![CDATA[need help with a cupbot !add !remove and !whois system]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51657#p51657"><![CDATA[
ok, i read lsearch, but dont understand what the script would look like.<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !add cup:addproc cup:add {nick host hand chan text} {if {![channel get $chan "cup"]} {putserv "PRIVMSG $chan :Error: $nick there is no cup runnnig."} elseif {[channel get $chan "cup"]} {set teamname [lindex [split $text] 5]set p1 [lindex [split $text] 1]set p2 [lindex [split $text] 2]set p3 [lindex [split $text] 3]set p4 [lindex [split $text] 4]if {([channel get $chan "s_cup_type"] == 5on5)} {blah} elseif 4on4 2on3 2on2 1on1 etc {blah} else {list $teamname $nick $p1 $p2 $p3 $p4putserv "PRIVMSG $chan :$nick signed up $p1 &amp; $2 &amp; $p3 &amp; $p4 as team: $teamname."}}Would that work, please helpThanks in advance!! im a nuub and list operations! </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sat Jul 02, 2005 9:44 am</p><hr />
]]></content>
	</entry>
	</feed>
