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

	<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>2008-11-14T05:37:10-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2008-11-14T05:37:10-04:00</updated>

		<published>2008-11-14T05:37:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85810#p85810</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85810#p85810"/>
		<title type="html"><![CDATA[Making Scripts Channel Specific]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85810#p85810"><![CDATA[
If you only want your game to work in a single channel, the code provided by tueb is fine, but if you want a more flexible way to manage what channels your games work in, create a new channel setting using setudef:<div class="codebox"><p>Code: </p><pre><code>setudef flag nameOfTheGame</code></pre></div>include the following snippet as the first line in any proc that needs to be limited:<div class="codebox"><p>Code: </p><pre><code>if {![channel get $chan nameOfTheGame]} return</code></pre></div>and use .chanset #chan +/-nameOfTheGame to enable/disable the game in your channels.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Nov 14, 2008 5:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tueb]]></name></author>
		<updated>2008-11-14T05:18:54-04:00</updated>

		<published>2008-11-14T05:18:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85808#p85808</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85808#p85808"/>
		<title type="html"><![CDATA[Making Scripts Channel Specific]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85808#p85808"><![CDATA[
Hi,<br><br>I had a similar problem and simply used:<br><br><div class="codebox"><p>Code: </p><pre><code>if {[string tolower $channel] != "#games"} {   return}</code></pre></div><br>at the beginning of the "proc's".<br><br><br>Hope that helps,<br><br>tueb<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9349">tueb</a> — Fri Nov 14, 2008 5:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Diablo228]]></name></author>
		<updated>2008-11-13T21:46:12-04:00</updated>

		<published>2008-11-13T21:46:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85803#p85803</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85803#p85803"/>
		<title type="html"><![CDATA[Making Scripts Channel Specific]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85803#p85803"><![CDATA[
I have numerous Game &amp; Channel Management scripts loaded on my Eggdrop (v 1.6.19). Some scripts have in-built functionality for specifying the respective #Channel the script should work on, and some don't. My bot sits on two Channels. #Games and #Help. We have some geniuses who activate the games on #Help. <br><br><strong class="text-strong">1) As a counter-measure I was wondering if there is a "bind" syntax that limits the commands to one specific channel? </strong><br><br><strong class="text-strong">2) Alternatively, could there be a 'quick proc' at the beginning of each TCL script to check if the commands are being issued in the right channel? I want this proc to be more universal in nature, rather than being script specific.</strong><br><br>Would this work:<br><div class="codebox"><p>Code: </p><pre><code>set channels "#Games"if {[lsearch -exact $channels $chan] == -1} {return 0}else {... execute rest of the script}</code></pre></div>Theoretically, I know what I want to do, but I am unable to implement it due to my lack of scripting knowledge. I tried playing around with "setudef flag" too, without much success. Thanks in advance for any replies.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9343">Diablo228</a> — Thu Nov 13, 2008 9:46 pm</p><hr />
]]></content>
	</entry>
	</feed>
