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

	<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>2003-12-13T10:19:22-04:00</updated>

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

		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2003-12-13T10:19:22-04:00</updated>

		<published>2003-12-13T10:19:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31385#p31385</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31385#p31385"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31385#p31385"><![CDATA[
hehe... it's voting script, operating system and you can hack microsoft with it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>give me your email and ill send it to you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Sat Dec 13, 2003 10:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-12-12T16:50:06-04:00</updated>

		<published>2003-12-12T16:50:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31374#p31374</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31374#p31374"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31374#p31374"><![CDATA[
Whew 93k! What is it, a voting script plus an operating system? Where is the link?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Dec 12, 2003 4:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2003-12-10T11:44:46-04:00</updated>

		<published>2003-12-10T11:44:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31270#p31270</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31270#p31270"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31270#p31270"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>wanna take a look at a 93kb voting script?</div></blockquote>Compress it to about 20k first and I'll have a look <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> (and use extremely short variable names or english words or I will hate reading your code <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">)</div></blockquote>hehe... its 16kb zipped and i used english variable names <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>please? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Wed Dec 10, 2003 11:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-12-09T16:51:42-04:00</updated>

		<published>2003-12-09T16:51:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31249#p31249</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31249#p31249"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31249#p31249"><![CDATA[
<blockquote class="uncited"><div>I wanted to paste my code here, but now I'll feel bad, after your post <span style="color:orange">user</span> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> Thx <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"></div></blockquote>Don't be shy <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> I didn't mean to make you feel bad. Sorry for that. Here's a proc to make it up to you.<br>A somewhat compressed version that does almost the same as the above proc, only twice as slow (due to uncompiled if statements) and more like mirc (i misunderstood the "<strong class="text-strong">A</strong> negative value" part of the mirc manual it seems):<div class="codebox"><p>Code: </p><pre><code>proc gettok {txt n c} {set c [format %c $c]set txt [split $txt $c]set i [llength $txt]if {[scan $n %i-%i a b]==2 ||\    [scan $n[expr {$i-1}] %i-%i a b]==2 ||\   ([scan $n %i a]&amp;&amp;[set b $a]!="")} {join [lrange $txt [expr {$a%$i}] [expr {$b%$i}]] $c}}</code></pre></div>...seriously though, posting your code would probably do you more good than harm. Very few of the people here bite coders that try their best. You might get some useful tips <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I don't recommend using any of my two procs. Doing a little list/calculation/other text formatting work wouldn't hurt your coding skills, and it'd be alot faster. (depending on how you code, of course)<br><blockquote class="uncited"><div>wanna take a look at a 93kb voting script?</div></blockquote>Compress it to about 20k first and I'll have a look <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> (and use extremely short variable names or english words or I will hate reading your code <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Dec 09, 2003 4:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2003-12-09T15:32:01-04:00</updated>

		<published>2003-12-09T15:32:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31246#p31246</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31246#p31246"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31246#p31246"><![CDATA[
<blockquote class="uncited"><div>he's a good scripter, isn't he?</div></blockquote>indeed. user, wanna take a look at a 93kb voting script? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Tue Dec 09, 2003 3:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cerberus_gr]]></name></author>
		<updated>2003-12-09T15:36:13-04:00</updated>

		<published>2003-12-09T15:28:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31244#p31244</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31244#p31244"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31244#p31244"><![CDATA[
He is the best. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>CrazyCat thx for your help too. I wrote a code in this format, but it had some bugs <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2661">cerberus_gr</a> — Tue Dec 09, 2003 3:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2003-12-09T13:58:26-04:00</updated>

		<published>2003-12-09T13:58:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31240#p31240</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31240#p31240"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31240#p31240"><![CDATA[
he's a good scripter, isn't he?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Dec 09, 2003 1:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cerberus_gr]]></name></author>
		<updated>2003-12-09T13:25:50-04:00</updated>

		<published>2003-12-09T13:25:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31238#p31238</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31238#p31238"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31238#p31238"><![CDATA[
I wanted to paste my code here, but now I'll feel bad, after your post <span style="color:orange">user</span> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> Thx <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2661">cerberus_gr</a> — Tue Dec 09, 2003 1:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-12-09T08:08:28-04:00</updated>

		<published>2003-12-09T08:08:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31233#p31233</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31233#p31233"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31233#p31233"><![CDATA[
Use '<a href="http://tcl.tk/man/tcl8.3/TclCmd/split.htm" class="postlink">split</a>' first, then '<a href="http://tcl.tk/man/tcl8.3/TclCmd/lindex.htm" class="postlink">lindex</a>' or '<a href="http://tcl.tk/man/tcl8.3/TclCmd/lrange.htm" class="postlink">lrange</a>' and '<a href="http://tcl.tk/man/tcl8.3/TclCmd/join.htm" class="postlink">join</a>'.<br><br>Or you could try this proc <div class="codebox"><p>Code: </p><pre><code>proc gettok {txt n c} {set c [format %c $c]set txt [split $txt $c]if {[string match *- $n]} {scan $n[llength $txt] %i-%i a b} elseif {[string match -* $n]} {set b [llength $txt]set a [expr $b$n]} elseif {[string match *-* $n]} {scan $n %i-%i a b} {set a [set b $n]}join [lrange $txt $a $b] $c}</code></pre></div>A couple of things that are different from the mirc version:<br>n is zero-based (the first token is 0)<br>the proc returns an empty string when the mirc thing would return "$null"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Dec 09, 2003 8:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2003-12-09T04:22:10-04:00</updated>

		<published>2003-12-09T04:22:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31221#p31221</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31221#p31221"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31221#p31221"><![CDATA[
seems to be [string] and <ul> <li>commands</li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Dec 09, 2003 4:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cerberus_gr]]></name></author>
		<updated>2003-12-09T04:06:43-04:00</updated>

		<published>2003-12-09T04:06:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31220#p31220</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31220#p31220"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31220#p31220"><![CDATA[
From the help file of the mIRC:<br><br><strong class="text-strong">$gettok(text,N,C)</strong><br>Returns the Nth token in text.<br><br>$gettok(a.b.c.d.e,3,46)  returns c<br>$gettok(a.b.c.d.e,9,46)  returns $null<br><br>You can also specify a range of tokens:<br><br>$gettok(a.b.c.d.e,2-,46) returns 2nd token onwards b.c.d.e<br>$gettok(a.b.c.d.e,2-4,46)returns tokens 2 through 4 b.c.d<br><br>You can specify a negative value for N.<br><br>Any help?<br>(I want both for 8.0 and 8.4 versions of tcl if anyone could help)<br>Thx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2661">cerberus_gr</a> — Tue Dec 09, 2003 4:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2003-09-19T13:39:04-04:00</updated>

		<published>2003-09-19T13:39:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=27304#p27304</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=27304#p27304"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=27304#p27304"><![CDATA[
what's gettok supposed to do ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Fri Sep 19, 2003 1:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2003-09-19T13:12:14-04:00</updated>

		<published>2003-09-19T13:12:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=27299#p27299</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=27299#p27299"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=27299#p27299"><![CDATA[
You can't, that's a mirc command.<br><br><a href="http://www.tcl.tk/man/tcl8.3/TclCmd/contents.htm" class="postlink">http://www.tcl.tk/man/tcl8.3/TclCmd/contents.htm</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Sep 19, 2003 1:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jag]]></name></author>
		<updated>2003-09-19T10:10:07-04:00</updated>

		<published>2003-09-19T10:10:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=27288#p27288</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=27288#p27288"/>
		<title type="html"><![CDATA[$gettok]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=27288#p27288"><![CDATA[
how can i use $gettok in TCL?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3871">Jag</a> — Fri Sep 19, 2003 10:10 am</p><hr />
]]></content>
	</entry>
	</feed>
