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

	<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-02-26T05:42:51-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Dw2k]]></name></author>
		<updated>2004-02-26T05:42:51-04:00</updated>

		<published>2004-02-26T05:42:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34000#p34000</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34000#p34000"/>
		<title type="html"><![CDATA[Talker Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34000#p34000"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div><blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set text [lrange $args 0 end] </code></pre></div></div></blockquote>quite useless eh? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>just remove that line and replace $text with $args<br><br>btw @Dw2k:<br>by using "join $args" you convert it to a string. using list commands on that is not a good idea. your "set text [lrange $args 0 end]" on the other hand returns a list, so you would have to use "join text" again.</div></blockquote>Arcane, normally, you would be correct, assuming we were talking about just plain ol TCL... but we are dealing with eggdrop TCL here, and the way "bind" calls procedures....  when args is used in this scenario, it is a list of lists, so by join'ing it once, it becomes a list...<br><br>Now, don't get me wrong, I agree with you arcane that it is an inefficient and impractical method... Using a variable name such as "text", and using split, etc.. would be much better, imo.<br><br>But just for informations sake, you should check out peterre's special characters page: <a href="http://www.peterre.com/characters.html" class="postlink">http://www.peterre.com/characters.html</a></div></blockquote>Thanks, that page is great <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=2329">Dw2k</a> — Thu Feb 26, 2004 5:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-02-25T23:31:26-04:00</updated>

		<published>2004-02-25T23:31:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33994#p33994</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33994#p33994"/>
		<title type="html"><![CDATA[Talker Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33994#p33994"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set text [lrange $args 0 end] </code></pre></div></div></blockquote>quite useless eh? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>just remove that line and replace $text with $args<br><br>btw @Dw2k:<br>by using "join $args" you convert it to a string. using list commands on that is not a good idea. your "set text [lrange $args 0 end]" on the other hand returns a list, so you would have to use "join text" again.</div></blockquote>Arcane, normally, you would be correct, assuming we were talking about just plain ol TCL... but we are dealing with eggdrop TCL here, and the way "bind" calls procedures....  when args is used in this scenario, it is a list of lists, so by join'ing it once, it becomes a list...<br><br>Now, don't get me wrong, I agree with you arcane that it is an inefficient and impractical method... Using a variable name such as "text", and using split, etc.. would be much better, imo.<br><br>But just for informations sake, you should check out peterre's special characters page: <a href="http://www.peterre.com/characters.html" class="postlink">http://www.peterre.com/characters.html</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Wed Feb 25, 2004 11:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dw2k]]></name></author>
		<updated>2004-02-25T09:22:25-04:00</updated>

		<published>2004-02-25T09:22:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33979#p33979</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33979#p33979"/>
		<title type="html"><![CDATA[Talker Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33979#p33979"><![CDATA[
I sometimes use <div class="codebox"><p>Code: </p><pre><code> set args [split [join $args] " "]</code></pre></div>I'll have to look at it more <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2329">Dw2k</a> — Wed Feb 25, 2004 9:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2004-02-25T09:02:23-04:00</updated>

		<published>2004-02-25T09:02:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33976#p33976</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33976#p33976"/>
		<title type="html"><![CDATA[Talker Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33976#p33976"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>set text [lrange $args 0 end] </code></pre></div></div></blockquote>quite useless eh? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>just remove that line and replace $text with $args<br><br>btw @Dw2k:<br>by using "join $args" you convert it to a string. using list commands on that is not a good idea. your "set text [lrange $args 0 end]" on the other hand returns a list, so you would have to use "join text" again.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Wed Feb 25, 2004 9:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-02-24T09:04:02-04:00</updated>

		<published>2004-02-24T09:04:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33943#p33943</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33943#p33943"/>
		<title type="html"><![CDATA[Talker Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33943#p33943"><![CDATA[
Yeha, it works, thank you.<br>All hail Dw2k that shalt be King hereafter.<p>Statistics: Posted by Guest — Tue Feb 24, 2004 9:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dw2k]]></name></author>
		<updated>2004-02-24T08:50:13-04:00</updated>

		<published>2004-02-24T08:50:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33942#p33942</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33942#p33942"/>
		<title type="html"><![CDATA[Talker Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33942#p33942"><![CDATA[
Yeah I suppose you could, as long as its just the one channel and it never changes <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>take out <div class="codebox"><p>Code: </p><pre><code>set chan [lindex $args 0] </code></pre></div>and rename the other to: <div class="codebox"><p>Code: </p><pre><code>set text [lrange $args 0 end] </code></pre></div>then have<br><div class="codebox"><p>Code: </p><pre><code> putserv "PRIVMSG #yourchannel :$text" </code></pre></div>put in the channel you want to message and it will always message that channel no matter what.<br><br><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=2329">Dw2k</a> — Tue Feb 24, 2004 8:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-02-24T06:16:36-04:00</updated>

		<published>2004-02-24T06:16:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33937#p33937</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33937#p33937"/>
		<title type="html"><![CDATA[Talker Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33937#p33937"><![CDATA[
Great!<br>It works, thank you very much.<br><br>But, is there a way to use the script to tell the bot in which channel he shall message?<br><br>So that I can use: /msg &lt;botname&gt; talk &lt;message&gt;<br>Instead of: /msg &lt;botname&gt; talk &lt;chan&gt; &lt;message&gt;<p>Statistics: Posted by Guest — Tue Feb 24, 2004 6:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dw2k]]></name></author>
		<updated>2004-02-24T04:35:36-04:00</updated>

		<published>2004-02-24T04:35:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33933#p33933</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33933#p33933"/>
		<title type="html"><![CDATA[Talker Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33933#p33933"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind msg - talk cmd:talkerproc cmd:talker {nick uhost hand args} {  set args [join $args]  set chan [lindex $args 0]  set text [lrange $args 1 end]   putserv "PRIVMSG $chan :$text"}</code></pre></div>That should <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=2329">Dw2k</a> — Tue Feb 24, 2004 4:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-02-24T02:29:02-04:00</updated>

		<published>2004-02-24T02:29:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33930#p33930</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33930#p33930"/>
		<title type="html"><![CDATA[Talker Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33930#p33930"><![CDATA[
It does not work this way  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"> <br>It is still the same mistake<br><div class="codebox"><p>Code: </p><pre><code>Tcl error [talker]: no value given for parameter "target" to "talker"</code></pre></div><p>Statistics: Posted by Guest — Tue Feb 24, 2004 2:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dw2k]]></name></author>
		<updated>2004-02-23T18:39:10-04:00</updated>

		<published>2004-02-23T18:39:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33917#p33917</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33917#p33917"/>
		<title type="html"><![CDATA[Talker Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33917#p33917"><![CDATA[
You need to replace<div class="codebox"><p>Code: </p><pre><code> proc talker {nick uhost hand chan text} { </code></pre></div>witu<div class="codebox"><p>Code: </p><pre><code> proc talker {nick uhost hand args} { </code></pre></div>and have<br><div class="codebox"><p>Code: </p><pre><code>set args [join $args]set chan [lindex $args 0]set text [lindex $args 1]</code></pre></div>then the rest of your code<br>you will need to use /msg botname tell #chan message<br><br>Hope that helps <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=2329">Dw2k</a> — Mon Feb 23, 2004 6:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-02-23T18:12:31-04:00</updated>

		<published>2004-02-23T18:12:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33916#p33916</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33916#p33916"/>
		<title type="html"><![CDATA[Talker Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33916#p33916"><![CDATA[
Hi there, I tried to write a "talker-script", where the bot sends a message to the channel if I tell him to do so (/msg &lt;botname&gt; tell &lt;message&gt;). Well, obviously it does not work. I am new at tcl and I do not really know what to do. I guess it is just a simple mistake.<br><br>This is the script:<br><br>  bind msg - tell talker<br><br>  proc talker {nick uhost hand chan text} {<br><br>          putserv "privmsg $chan :$text"<br>          return 1<br>  }<br> <br>And this is the error that I get:<br>  Tcl error [talker]: no value given for parameter "target" to "talker"<br><br>I would be very happy if you could help me.<p>Statistics: Posted by Guest — Mon Feb 23, 2004 6:12 pm</p><hr />
]]></content>
	</entry>
	</feed>
