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

	<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>2004-09-29T03:17:43-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Calamaro]]></name></author>
		<updated>2004-09-29T03:17:43-04:00</updated>

		<published>2004-09-29T03:17:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41414#p41414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41414#p41414"/>
		<title type="html"><![CDATA[Modifying a pub trigger to a msg trigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41414#p41414"><![CDATA[
<blockquote class="uncited"><div>use 'onchan' to check if they're on a particular channel (it's in tcl-commands.doc)</div></blockquote>Thanks for telling me about this file. I'm finding it very helpful.<br><blockquote class="uncited"><div>Here is what you need:<br><div class="codebox"><p>Code: </p><pre><code>Set your channel hereset channel "#mychannel"### PUB TRIGGER ###bind pub - trigger pub_trigger proc pub_trigger {nick uhost hand chan text} { global channel if {([string equal -nocase $channel $chan])} { # do your stuff  }}### MSG TRIGGER ###bind msg - trigger msg_trigger proc msg_trigger {nick uhost hand text} { global channel if {(![onchan $nick $channel])} { putserv "PRIVMSG $nick :You need to join $channel for this script to be triggered."; return 0 } if {([onchan $nick $channel])} { # do your stuff  }}</code></pre></div></div></blockquote>Thanks dude, i appreciate it. Works like a charm.<br><br>-Calamaro<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5487">Calamaro</a> — Wed Sep 29, 2004 3:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-09-28T22:09:19-04:00</updated>

		<published>2004-09-28T22:09:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41410#p41410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41410#p41410"/>
		<title type="html"><![CDATA[Modifying a pub trigger to a msg trigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41410#p41410"><![CDATA[
Here is what you need:<br><div class="codebox"><p>Code: </p><pre><code>Set your channel hereset channel "#mychannel"### PUB TRIGGER ###bind pub - trigger pub_trigger proc pub_trigger {nick uhost hand chan text} { global channel if {([string equal -nocase $channel $chan])} { # do your stuff  }}### MSG TRIGGER ###bind msg - trigger msg_trigger proc msg_trigger {nick uhost hand text} { global channel if {(![onchan $nick $channel])} { putserv "PRIVMSG $nick :You need to join $channel for this script to be triggered."; return 0 } if {([onchan $nick $channel])} { # do your stuff  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Tue Sep 28, 2004 10:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-09-28T19:41:30-04:00</updated>

		<published>2004-09-28T19:41:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41398#p41398</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41398#p41398"/>
		<title type="html"><![CDATA[Modifying a pub trigger to a msg trigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41398#p41398"><![CDATA[
use 'onchan' to check if they're on a particular channel (it's in tcl-commands.doc)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Sep 28, 2004 7:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Calamaro]]></name></author>
		<updated>2004-09-28T19:28:56-04:00</updated>

		<published>2004-09-28T19:28:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41396#p41396</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41396#p41396"/>
		<title type="html"><![CDATA[Modifying a pub trigger to a msg trigger]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41396#p41396"><![CDATA[
Hi,<br>I'm trying to modify a script that has a "bind pub" trigger to use a "bind msg" trigger.  Here's what i got so far.<br><div class="codebox"><p>Code: </p><pre><code>bind pub - trigger pub_triggerbind msg - trigger msg_triggerproc msg_trigger { nick host handle text } {    pub_trigger $nick $host $handle "#channel" $text}proc pub_trigger {nick uhost hand channel rest} {    ...}</code></pre></div>With this code the script works when called with either the pub or msg trigger. The problem is that anyone can msg the trigger to the bot without being in #channel. I need some help with the code to make it check if the user is on #channel and then if a)the user is not on the channel they would get a message informing them that they need to join #channel or b)they are on the channel and can use the script.<br><br>Am i making any sense?<br><br>-Calamaro<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5487">Calamaro</a> — Tue Sep 28, 2004 7:28 pm</p><hr />
]]></content>
	</entry>
	</feed>
