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

	<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-05-08T17:32:15-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-05-08T17:32:15-04:00</updated>

		<published>2005-05-08T17:32:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49224#p49224</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49224#p49224"/>
		<title type="html"><![CDATA[Switch Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49224#p49224"><![CDATA[
<blockquote class="uncited"><div>Hey, thanks! It works now, got another question, how can I find out if there is a certin element in an array?</div></blockquote>1st: this isnt an array, it's a list. arrays are used like: $array(element)<br>2nd: count the spaces or the {} expressions if present<br>example:<br>ex: 1 2 3 4 5<br>this has 5 elements<br><br>ex: {1 2} {3 4} 5<br>this has 3 elements<br><br>also remember, the first element has the index 0 ^-^.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun May 08, 2005 5:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[daltonc]]></name></author>
		<updated>2005-05-08T10:40:40-04:00</updated>

		<published>2005-05-08T10:40:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49201#p49201</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49201#p49201"/>
		<title type="html"><![CDATA[Switch Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49201#p49201"><![CDATA[
Hey, thanks! It works now, got another question, how can I find out if there is a certin element in an array?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6153">daltonc</a> — Sun May 08, 2005 10:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[^DooM^]]></name></author>
		<updated>2005-05-07T17:58:31-04:00</updated>

		<published>2005-05-07T17:58:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49182#p49182</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49182#p49182"/>
		<title type="html"><![CDATA[Switch Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49182#p49182"><![CDATA[
Change this<div class="codebox"><p>Code: </p><pre><code>set command [lindex [split $arg] 1]</code></pre></div>To this<div class="codebox"><p>Code: </p><pre><code>set command [lindex [split $arg] 0]</code></pre></div>$arg 1 would be the second element in the list after you called the proc so the first one which is what your matching it to should be 0  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3723">^DooM^</a> — Sat May 07, 2005 5:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[daltonc]]></name></author>
		<updated>2005-05-07T17:53:17-04:00</updated>

		<published>2005-05-07T17:53:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49181#p49181</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49181#p49181"/>
		<title type="html"><![CDATA[Switch Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49181#p49181"><![CDATA[
Doesnt seem to work, when I do @global rehash. It gives me the error saying I didnt specify a command.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6153">daltonc</a> — Sat May 07, 2005 5:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[^DooM^]]></name></author>
		<updated>2005-05-07T17:28:37-04:00</updated>

		<published>2005-05-07T17:28:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49178#p49178</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49178#p49178"/>
		<title type="html"><![CDATA[Switch Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49178#p49178"><![CDATA[
Try this<br><div class="codebox"><p>Code: </p><pre><code>proc command:global {nick uhost hand chan arg} {global botnick    if {[isop $nick #nrbots]} {        set command [lindex [split $arg] 1]                switch -- $command {            "rehash" {                 rehash                 if {$botnick == "nrbot-01"} {                     putnotc $nick "Rehashing Complete"                 }            }                    "cycle" {                putserv "PART $chan :cycle"                putserv "JOIN $chan"            }                   default {                putnotc $nick "Error(1): You didnt specify a global command."            }        }         } else {        putnotc $nick "Error(1): You lack access to the bot network"        putnotc $nick "Error(2): Unable to 'global'"    }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3723">^DooM^</a> — Sat May 07, 2005 5:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[daltonc]]></name></author>
		<updated>2005-05-07T16:02:19-04:00</updated>

		<published>2005-05-07T16:02:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49175#p49175</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49175#p49175"/>
		<title type="html"><![CDATA[Switch Help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49175#p49175"><![CDATA[
Hey, I am kinda new to the switch function, anyone wanna help? This isnt working..<br><div class="codebox"><p>Code: </p><pre><code>proc command:global {nick uhost hand chan arg} {global botnickif {[isop $nick #nrbots]} {  switch [lindex $arg 1] {    "rehash" {     rehash     if {[${botnick} == "nrbot-01"]} {     putnotc $nick "Rehashing Complete"     }    }    "cycle" {     putserv "PART $chan :cycle"     putserv "JOIN $chan"   }   default {     putnotc $nick "Error(1): You didnt specify a global command."   }  } } else {    putnotc $nick "Error(1): You lack access to the bot network"    putnotc $nick "Error(2): Unable to 'global'"  }}</code></pre></div>Its giving me.. the "You didnt specify a global command."<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6153">daltonc</a> — Sat May 07, 2005 4:02 pm</p><hr />
]]></content>
	</entry>
	</feed>
