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

	<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-09-16T20:27:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-09-16T20:27:04-04:00</updated>

		<published>2004-09-16T20:27:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40968#p40968</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40968#p40968"/>
		<title type="html"><![CDATA[Question to a script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40968#p40968"><![CDATA[
Good luck!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Thu Sep 16, 2004 8:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-16T16:52:49-04:00</updated>

		<published>2004-09-16T16:52:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40965#p40965</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40965#p40965"/>
		<title type="html"><![CDATA[Question to a script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40965#p40965"><![CDATA[
Thank you very much !<br><br>my script is not working at the moment, but im working on it  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br>im new in Tcl, so i will read some manuals, and i hope then i can bind your code into my script  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"> <br><br>but now i have a base, and know how it can work, so i thing i should be able to make it  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>greets, sceada<p>Statistics: Posted by Guest — Thu Sep 16, 2004 4:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-09-15T21:20:04-04:00</updated>

		<published>2004-09-15T21:20:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40952#p40952</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40952#p40952"/>
		<title type="html"><![CDATA[Question to a script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40952#p40952"><![CDATA[
Well use something like this.<br>Replace the variable $args with $text or $arg as $args in tcls stands for a list, and it is showing your variables in a list structure with the { }.<br><br>Example:<br>set mynames { "james" "lewis" "jessica" "dave" "michael" }<br><div class="codebox"><p>Code: </p><pre><code>set newvar "[lindex $text 0]_[lindex $text 1]"#This should make them in the form "$var1_$var2"#or on your current settings you can doset newvar [join $var {_}] #where $var is the list being shown as {Black Lotus}</code></pre></div>If you want to do it for "N" variables then you would need to do a for loop and incr value one at a time for each lindex in $text and lappend all the variables in a new list and then join with {_}.<br><br>Something like this: (not tested)<br><div class="codebox"><p>Code: </p><pre><code>set variables [list]set textlength [expr [llength $text] - 1] for {set i 0} {$i &lt; $textlength} {incr i} {  if {([lindex $text $i] != "")} {    lappend variables [lindex $text $i]   }  }  if {($variables != "")} { set variables [join $variables {_}] }  #Then go ahead and do your stuff with $variables and display them.</code></pre></div>Alternatively, you can also use concat.<br>See the tcl manual for commands such as join, concat, lappend, append etc.  <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=4875">awyeah</a> — Wed Sep 15, 2004 9:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-15T13:57:18-04:00</updated>

		<published>2004-09-15T13:57:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40946#p40946</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40946#p40946"/>
		<title type="html"><![CDATA[Question to a script...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40946#p40946"><![CDATA[
Hi !<br><br>I have a Problem with a search script i`ve written...<br>I have the script with different commands and urls, but i use only one of them here to explain you my Problem.<br>(this bot is for a bot in a channel where we talk about Magic the Gathering..)<br><br>The script:<br>bind pub - .info infosearch<br><br>proc infosearch { nick uhost hand chan args } {<br>putchan $chan <a href="http://magiccards.info/query.php?cardname=$args" class="postlink">http://magiccards.info/query.php?cardname=$args</a><br>}<br><br>This works fine, if there is only 1 keyword to search:<br>(@sceada) .info Lotus<br>(@|magicbot|) <a href="http://magiccards.info/query.php?cardname=Lotus" class="postlink">http://magiccards.info/query.php?cardname=Lotus</a><br><br>But now my Problem:<br>when there are 2 Words, it doesnt work :<br>(@sceada) .info Black Lotus<br>(@|magicbot|) <a href="http://magiccards.info/query.php?cardname=%7BBlack" class="postlink">http://magiccards.info/query.php?cardname={Black</a> Lotus}<br><br>But i want the Bot to give out the 2 Words with an "_" between...<br>(<a href="http://magiccards.info/query.php?cardname=Black_Lotus" class="postlink">http://magiccards.info/query.php?cardname=Black_Lotus</a>)<br><br>how can i make this ?<br>(or even for more words...)<br><br>(im sorry for my bad english, but i`m from Austria...)<br>mfg, sceada<p>Statistics: Posted by Guest — Wed Sep 15, 2004 1:57 pm</p><hr />
]]></content>
	</entry>
	</feed>
