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

	<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>2007-10-10T13:06:02-04:00</updated>

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

		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2007-10-10T13:06:02-04:00</updated>

		<published>2007-10-10T13:06:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76566#p76566</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76566#p76566"/>
		<title type="html"><![CDATA[Help please I'm lost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76566#p76566"><![CDATA[
Here's a typical way of limiting which channels a script runs in:<br><div class="codebox"><p>Code: </p><pre><code># Channels where we allow public use:set moviechans "#mychan #chan2 #etc"bind pub - .movies proc:moviesbind msg - .movies proc:msgmoviesproc proc:msgmovies {nick uhost hand text} {if {![onchan $nick]} {return}proc:movies $nick $uhost $hand privmsg $textreturn}proc proc:movies {nick uhost hand chan text} {set command [lindex [split $text] 0]if {([lsearch -exact $::moviechans $chan] == -1) &amp;&amp; ($chan != "privmsg")} {return}if {([lsearch -exact $::moviequiet $chan] != -1) || ($chan == "privmsg")} {set chan $nick}# and so on}</code></pre></div>Note that using $:: is equivalent to using a global declaration. So, you can use either a line like:<br><br>global moviechans<br><br>or just use $::moviechans to refer to global variables (outside of the proc)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Oct 10, 2007 1:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tueb]]></name></author>
		<updated>2007-10-10T04:23:55-04:00</updated>

		<published>2007-10-10T04:23:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76553#p76553</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76553#p76553"/>
		<title type="html"><![CDATA[Help please I'm lost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76553#p76553"><![CDATA[
I'm not quite sure what you want. <br>Maybe this will help you:<br><div class="codebox"><p>Code: </p><pre><code>set urchan "#chan"set word "word"set msg "Hi!"bind pub - $word my:exampleproc my:example {nick uhost hand chan text} {global urchan msgif {$chan != $urchan} { return }putserv "PRIVMSG $chan :$msg"##place additional code here#}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9349">tueb</a> — Wed Oct 10, 2007 4:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Stupidman]]></name></author>
		<updated>2007-10-09T15:10:37-04:00</updated>

		<published>2007-10-09T15:10:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=76537#p76537</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=76537#p76537"/>
		<title type="html"><![CDATA[Help please I'm lost]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=76537#p76537"><![CDATA[
I have the code I want to use for the project I'm working on, but, I want it to be displayed only when the person types it in a certain channel. I dont want it in any other channel but that. I have all the code but I can't figure out how to make it like this<br><br>if (word isin channel) { putmsg $chan :Hi! } { else halt }<br><br>So if the word, word is not in "channel", dont do anything, but if it is. tell them the bot said hi.<br><br>Am I making any sense, I dont know if I make any sense?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9303">Stupidman</a> — Tue Oct 09, 2007 3:10 pm</p><hr />
]]></content>
	</entry>
	</feed>
