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

	<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>2011-02-08T13:34:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[silenus]]></name></author>
		<updated>2011-02-08T13:34:07-04:00</updated>

		<published>2011-02-08T13:34:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95987#p95987</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95987#p95987"/>
		<title type="html"><![CDATA[Binds to msg and pub allow scripts to interact - SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95987#p95987"><![CDATA[
@Papillon Yes. There are no bugs, only lessons.  I am a very amateur programmer and had no clear idea of the way in which scripts work within the bot.  I saw them as little packages, ring-fenced by the bind which calls them. I know better now.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9604">silenus</a> — Tue Feb 08, 2011 1:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2011-02-08T12:19:49-04:00</updated>

		<published>2011-02-08T12:19:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95985#p95985</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95985#p95985"/>
		<title type="html"><![CDATA[Binds to msg and pub allow scripts to interact - SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95985#p95985"><![CDATA[
@silenus: Good that you solved it. It is just to remember that when you name a global variable or procedure, that name is truly global in your bot. You may have a procedure in one script, but call it from another script. Namespaces helps solve this problem if used correctly <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>@caesar: it is me ye, been studying and generally having a real life once more <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=852">Papillon</a> — Tue Feb 08, 2011 12:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[silenus]]></name></author>
		<updated>2011-02-07T18:14:58-04:00</updated>

		<published>2011-02-07T18:14:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95975#p95975</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95975#p95975"/>
		<title type="html"><![CDATA[Binds to msg and pub allow scripts to interact - SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95975#p95975"><![CDATA[
Just a short note about the outcome.  After half an hour learning about namespaces my scripts now work together without any problems. <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=9604">silenus</a> — Mon Feb 07, 2011 6:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[silenus]]></name></author>
		<updated>2011-02-07T16:27:09-04:00</updated>

		<published>2011-02-07T16:27:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95974#p95974</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95974#p95974"/>
		<title type="html"><![CDATA[Binds to msg and pub allow scripts to interact - SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95974#p95974"><![CDATA[
Thank-you all for prompt and helpful responses.  After papillon replied I had tried changing the names of the procedures attached to binds, but I was still experiencing a problem with a global variable (same name in both scripts), and now I am having a further problem with another variable (also same name in both scripts).  I have feeling that the dominoes will continue to fall as fixing one problem reveals another.  I know that these scripts work separately, so the problem must be with their interaction, and it seems that I would be better spending my time learning about the namespaces to which willyw draws my attention than fiddling with names of procs and variables.  For this reason caesar, I don't think it would help for me to take up your time by posting code here.<br><br>Thanks again - I will mark this "solved"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9604">silenus</a> — Mon Feb 07, 2011 4:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2011-02-07T16:01:00-04:00</updated>

		<published>2011-02-07T16:01:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95973#p95973</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95973#p95973"/>
		<title type="html"><![CDATA[Binds to msg and pub allow scripts to interact - SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95973#p95973"><![CDATA[
Also, see:<br><br><a href="http://forum.egghelp.org/viewtopic.php?t=12900" class="postlink">http://forum.egghelp.org/viewtopic.php?t=12900</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Mon Feb 07, 2011 4:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2011-02-07T15:52:12-04:00</updated>

		<published>2011-02-07T15:52:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95972#p95972</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95972#p95972"/>
		<title type="html"><![CDATA[Binds to msg and pub allow scripts to interact - SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95972#p95972"><![CDATA[
@silenus : post some code where you're stuck.<br><br>@Papillon <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"> OMG! Are you the Papillon i know? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> Dude, where you've been all this time? <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_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Feb 07, 2011 3:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2011-02-07T13:37:46-04:00</updated>

		<published>2011-02-07T13:37:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95968#p95968</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95968#p95968"/>
		<title type="html"><![CDATA[Binds to msg and pub allow scripts to interact - SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95968#p95968"><![CDATA[
You are sort of answering your own question. There are indeed two different binds, but they are both bound to the same procedure, or to two different procedures called by the same name... this will always cause troubles.<br><br> <strong class="text-strong">get_message</strong> rename one of them and they will not interfere with eachother<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Mon Feb 07, 2011 1:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[silenus]]></name></author>
		<updated>2011-02-07T16:28:32-04:00</updated>

		<published>2011-02-07T13:19:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=95966#p95966</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=95966#p95966"/>
		<title type="html"><![CDATA[Binds to msg and pub allow scripts to interact - SOLVED]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=95966#p95966"><![CDATA[
I have had trouble formulating a good subject line for this question, but it comes down to the fact that I must have a fundamental misunderstanding of binds.  Can anyone explain to me please what I am doing wrong here?  I have written two scripts (mychann.tcl and mychann_ops.tcl).  As you might expect, mychann.tcl runs in #mychann and mychann_ops.tcl runs in #mychann_ops.  The same bot is present in both channels.<br><br>The scripts do essentially the same thing and have a lot of procs in common, but they have different binds. mychann.tcl is bound to msg like this : <div class="codebox"><p>Code: </p><pre><code>bind msg - !foo get_message</code></pre></div> On the other hand mychann_ops.tcl is bound to pub like this: <div class="codebox"><p>Code: </p><pre><code>bind pub - !foo get_message</code></pre></div>  As I understood things, this should have been enough to keep each script to its own channel and function.<br><br>What I find, however, is that the command !foo when issued in #mychann_ops also triggers mychann.tcl in #mychann - which then throws an error message because of the different number of args expected by get_message when bound to msg as opposed to being bound to pub. Both scripts then terminate.  I am thinking of workarounds, but I am really puzzled as to why this behaviour occurs at all, when they have different binds.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9604">silenus</a> — Mon Feb 07, 2011 1:19 pm</p><hr />
]]></content>
	</entry>
	</feed>
