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

	<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>2007-03-17T13:48:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-03-17T13:48:12-04:00</updated>

		<published>2007-03-17T13:48:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71313#p71313</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71313#p71313"/>
		<title type="html"><![CDATA[switch help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71313#p71313"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - !select pub:selectproc pub:select {nick uhost hand chan arg} { # --n#  set switch [lindex [split $arg] 0] # if switch is not --n&lt;number&gt; then return if {![regexp -- {--n[0-9]{1,}} $switch]} {return 0} # take the number after --n set num [string range $switch 3 end] # take the rest set rest [join [lrange [split $arg] 1 end]] switch -- $num {  1 {   # the number is 1, do whatever  }  2 {   # the number is 2, do whatever  }  default {   # any other number  } }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Mar 17, 2007 1:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[veblen]]></name></author>
		<updated>2007-03-17T13:23:23-04:00</updated>

		<published>2007-03-17T13:23:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71312#p71312</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71312#p71312"/>
		<title type="html"><![CDATA[switch help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71312#p71312"><![CDATA[
im only quite new to tcl scripting, and i want to set a switch to use as variables within a proc. im not too sure how to do this properly, so if someone could just give me a quick example.<br><br>on command in channel !select, i want to use a switch to give me a variable number. so the line in a channel would be:<br><br>!select --n20 rest of the text string here<br><br>i want to use whatever number after --n as the variable to use in the rest of the proc, and i need the rest of the text string in a variable too.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8786">veblen</a> — Sat Mar 17, 2007 1:23 pm</p><hr />
]]></content>
	</entry>
	</feed>
