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

	<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>2016-04-16T07:57:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2016-04-16T07:57:04-04:00</updated>

		<published>2016-04-16T07:57:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104927#p104927</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104927#p104927"/>
		<title type="html"><![CDATA[[SOLVED]  Tcl error: wrong # args]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104927#p104927"><![CDATA[
<blockquote class="uncited"><div>...<br> the doc/tcl-commands.doc file.  That's my next stop.<br><br>...</div></blockquote><br>Also found here:<br><a href="http://www.eggheads.org/support/egghtml/1.6.21/tcl-commands.html" class="postlink">http://www.eggheads.org/support/egghtml ... mands.html</a><br><br>I find it handy to view/read/search it online, myself.<br>I <strong class="text-strong">think</strong> this is the current version.  Maybe someone else can comment on this.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Sat Apr 16, 2016 7:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Landslyde]]></name></author>
		<updated>2016-04-16T04:13:07-04:00</updated>

		<published>2016-04-16T04:13:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104926#p104926</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104926#p104926"/>
		<title type="html"><![CDATA[[SOLVED]  Tcl error: wrong # args]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104926#p104926"><![CDATA[
Get_A_Fix: <br><br>Much appreciated.  Especially the info on the doc/tcl-commands.doc file.  That's my next stop.<br><br>Have a good one.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12386">Landslyde</a> — Sat Apr 16, 2016 4:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Get_A_Fix]]></name></author>
		<updated>2016-04-16T03:59:36-04:00</updated>

		<published>2016-04-16T03:59:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104925#p104925</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104925#p104925"/>
		<title type="html"><![CDATA[[SOLVED]  Tcl error: wrong # args]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104925#p104925"><![CDATA[
<blockquote class="uncited"><div>Get_A_Fix:<br><br>One of the things that puzzles me is the usages of:<div class="codebox"><p>Code: </p><pre><code>putservputhelpputquick</code></pre></div>I may have left some off, but I don't understand the differences, if any, between those.</div></blockquote>The difference is merely queue, where putserv (sending commands to server) has the highest sending queue, puthelp (sending commands to channel/nickname) has less, and putquick (sending commands as fast as queue allows) is for limited output as to not excess flood the bot offline.<br>Info about these queues, and other's (like putnow..) can be found in your doc/tcl-commands.doc file, shipped with your eggdrop.<br><br>Good luck! Keep coding <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=6204">Get_A_Fix</a> — Sat Apr 16, 2016 3:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Landslyde]]></name></author>
		<updated>2016-04-16T00:29:08-04:00</updated>

		<published>2016-04-16T00:29:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104924#p104924</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104924#p104924"/>
		<title type="html"><![CDATA[[SOLVED]  Tcl error: wrong # args]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104924#p104924"><![CDATA[
Get_A_Fix:<br><br>Thanks for your reply. What I ended up doing was this:<br><div class="codebox"><p>Code: </p><pre><code># Start of pub_lovesmeproc pub_lovesme {nick host handle channel arg} {global loves0 loves1 emo1set emo2 [lindex $emo1 [rand [llength $emo1]]]set loves00 [lindex $loves0 [rand [llength $loves0]]]set loves2 [lindex $loves1 [rand [llength $loves1]]]set mychanlist [chanlist $channel]set randomnick [lindex $mychanlist [rand [llength $mychanlist]]]if { $loves2 != "" } {set lovemsg $loves00$randomnick$loves2$nick$emo2putserv "PRIVMSG $channel :$lovemsg" lovemsgreturn 1} else {putserv "PRIVMSG $channel :Sorry, $nick, but no one loves you."return 1}}# End of .lovesme</code></pre></div>Works like a charm. But I appreciate you showing me how to exclude the bot. <br><br>One of the things that puzzles me is the usages of:<br><div class="codebox"><p>Code: </p><pre><code>putservputhelpputquick</code></pre></div>I may have left some off, but I don't understand the differences, if any, between those.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12386">Landslyde</a> — Sat Apr 16, 2016 12:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Get_A_Fix]]></name></author>
		<updated>2016-04-14T06:46:59-04:00</updated>

		<published>2016-04-14T06:46:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104921#p104921</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104921#p104921"/>
		<title type="html"><![CDATA[[SOLVED]  Tcl error: wrong # args]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104921#p104921"><![CDATA[
lol, you were just declaring to variables after it has been processed and put to channel.<br><div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $channel :$randomnick $lovesme2 $nick" randomnick lovesme2 </code></pre></div>So, your code was fine <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>I only added a small substitution so that you could use $nick $chan arguments within your set list, and a check to make sure randomnick wasn't botnick (and if it was, just send a silly message to chan).<br><div class="codebox"><p>Code: </p><pre><code>bind pub - .lovesme pub_lovesmeset lovesme1 {   "is in deep love with you, $nick"   "loves loves loves you, $nick"   "only loves loves $chan ..."}proc pub_lovesme {nick uhost hand chan arg} {   global lovesme1   set lovesme2 [lindex $lovesme1 [rand [llength $lovesme1]]]   set lovesme2 [subst -nocommands $lovesme2]   set mychanlist [chanlist $chan]   set randomnick [lindex $mychanlist [rand [llength $mychanlist]]]   if {[isbotnick $randomnick]} {puthelp "PRIVMSG $chan :Sorry, $nick, but bot love leads to botulism.."; return}   puthelp "PRIVMSG $chan :$randomnick $lovesme2"   return 0}</code></pre></div>Alternatively, to remove the botnick completely, and avoid the above isbotnick check, use:<div class="codebox"><p>Code: </p><pre><code>set mychanlist [chanlist $chan]set rembot [lsearch $mychanlist $::botnick]set mychanlist [lreplace $mychanlist $rembot $rembot]set randomnick [lindex $mychanlist [rand [llength $mychanlist]]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6204">Get_A_Fix</a> — Thu Apr 14, 2016 6:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Landslyde]]></name></author>
		<updated>2016-04-14T00:25:22-04:00</updated>

		<published>2016-04-14T00:25:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104920#p104920</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104920#p104920"/>
		<title type="html"><![CDATA[[SOLVED]  Tcl error: wrong # args]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104920#p104920"><![CDATA[
Never mind. I figured it out. I added this to concatenate the two vars:<br><div class="codebox"><p>Code: </p><pre><code>{...set lovemsg $randomnick$lovesme2putserv "PRIVMSG $channel :$lovemsg $nick" lovemsgreturn 1}</code></pre></div>Sure. This is cheesy stuff, but the girls wanted it.  What can I say <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Peace out...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12386">Landslyde</a> — Thu Apr 14, 2016 12:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Landslyde]]></name></author>
		<updated>2016-04-14T01:32:15-04:00</updated>

		<published>2016-04-13T22:38:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104919#p104919</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104919#p104919"/>
		<title type="html"><![CDATA[[SOLVED]  Tcl error: wrong # args]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104919#p104919"><![CDATA[
I'm new to TCL scripting. When I want my bot to do something, I find a script to learn from. That said, here I am. Stuck!<br><br>My code is:<br><div class="codebox"><p>Code: </p><pre><code>bind pub - .lovesme pub_lovesmeset lovesme1 {"is in deep love with you, ""loves loves loves you, "}proc pub_lovesme {nick host handle channel arg} {global lovesme1set lovesme2 [lindex $lovesme1 [rand [llength $lovesme1]]]set mychanlist [chanlist $channel]set randomnick [lindex $mychanlist [rand [llength $mychanlist]]]putserv "PRIVMSG $channel :$randomnick $lovesme2 $nick" randomnick lovesme2return 1}</code></pre></div>But this fails and i get:<br><div class="codebox"><p>Code: </p><pre><code>Tcl error [pub_lovesme]: wrong # args: should be "putserv text ?options?"</code></pre></div> What am I doing wrong? Any help wld be appreciated. Thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12386">Landslyde</a> — Wed Apr 13, 2016 10:38 pm</p><hr />
]]></content>
	</entry>
	</feed>
