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

	<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>2010-03-22T12:31:53-04:00</updated>

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

		<entry>
		<author><name><![CDATA[raider2k]]></name></author>
		<updated>2010-03-22T12:31:53-04:00</updated>

		<published>2010-03-22T12:31:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92563#p92563</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92563#p92563"/>
		<title type="html"><![CDATA[MSG Commands?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92563#p92563"><![CDATA[
/&lt;- CODE<br><br>bind pub - !test test_pub<br>proc <strong class="text-strong">test_pub</strong> {nick uhost handle <strong class="text-strong">chan</strong> text  } {<br><br>-&gt;/ CODE<br><br>when bind PUB has been specified put channel in there as an arguement being passed on ("chan" in my case). why? because a PUBlic event can be triggered in a CHANNEL, therefore channel is needed<br><br>/&lt;- CODE<br><br>bind msg - !test test_msg<br>proc <strong class="text-strong">test_msg</strong> {nick uhost handle text  } { <br><br>-&gt;/ CODE<br><br>when bind MSG has been specified do NOT put the channel arguement in there, as the bind type already says -&gt; its a MSG type which can ONLY be triggered in a msg/query-window, theres NO channel, so NO channel arguement being passed on either.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9589">raider2k</a> — Mon Mar 22, 2010 12:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-03-19T19:10:40-04:00</updated>

		<published>2010-03-19T19:10:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92525#p92525</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92525#p92525"/>
		<title type="html"><![CDATA[MSG Commands?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92525#p92525"><![CDATA[
You're not supposed to put something there...<br>The first line explains the bind command - or how to create the trigger.<br>The second line explains what will be executed when the binding triggers.. That is, assuming we've got this:<div class="codebox"><p>Code: </p><pre><code>bind msg - Hi do_hi</code></pre></div>This creates a "/msg" binding for the word "Hi", and when it triggers it will call the proc "do_hi" with for parameters: the nickname of the user, the user@host of the user, the handle (as your bot sees it) of the user - or * if unknown, and whatever the user wrote after "Hi".<br><br>As such, your proc (do_hi) would have to accept 4 arguments (one for each parameter). The first argument will hold the first parameter (the nickname), the second argument the second parameter, etc... Each argument will then be available as a local variable with the same name within the proc.<br><br>What you call these arguments is pretty much up to you (as long as you don't use "args", as this is a special argument name for tcl), although using descriptive names usually helps writing good code. A common practice is "nick host hand text", but you could just as easily use "nick userhost handle text", or simply "n u h t". It doesn't matter, as long as you keep track of the names of the arguments/variables in your code...<br><br>In your first example, you don't make use of any of the arguments, so the names are really not important, only that you have one for each parameter (total of 4).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Fri Mar 19, 2010 7:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CharlesZink]]></name></author>
		<updated>2010-03-19T13:57:44-04:00</updated>

		<published>2010-03-19T13:57:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92517#p92517</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92517#p92517"/>
		<title type="html"><![CDATA[?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92517#p92517"><![CDATA[
Ok Thanks. What is the &lt;user@host&gt; for? What am I suppose to put in there?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11123">CharlesZink</a> — Fri Mar 19, 2010 1:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2010-03-16T20:53:09-04:00</updated>

		<published>2010-03-16T20:53:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92496#p92496</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92496#p92496"/>
		<title type="html"><![CDATA[MSG Commands?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92496#p92496"><![CDATA[
Your proc's argument list does not match the parameters provided by the msg binding (reading from doc/tcl-commands.doc):<blockquote class="uncited"><div>    (1)  MSG<br>         bind msg &lt;flags&gt; &lt;command&gt; &lt;proc&gt;<br>         procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;text&gt;<br><br>         Description: used for /msg commands. The first word of the user's<br>           msg is the command, and everything else becomes the text argument.<br>         Module: server</div></blockquote>Or, even more obviously, msg's don't come through a channel; drop the "channel" argument from the list.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Mar 16, 2010 8:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CharlesZink]]></name></author>
		<updated>2010-03-16T20:27:07-04:00</updated>

		<published>2010-03-16T20:27:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=92495#p92495</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=92495#p92495"/>
		<title type="html"><![CDATA[MSG Commands?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=92495#p92495"><![CDATA[
Not sure if this should be in help or scripting help. My bot won't respond to messages. Here is what I have,<br><div class="codebox"><p>Code: </p><pre><code>bind msg - test test_msgproc test_msg {nick host handle channel testes  } {putserv "PRIVMSG $nick :It works!"return 0} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11123">CharlesZink</a> — Tue Mar 16, 2010 8:27 pm</p><hr />
]]></content>
	</entry>
	</feed>
