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

	<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-01-20T16:09:33-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-01-20T16:09:33-04:00</updated>

		<published>2008-01-20T16:09:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80223#p80223</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80223#p80223"/>
		<title type="html"><![CDATA[Binding a certain ACTION CTCP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80223#p80223"><![CDATA[
Hmm... think you could post your test, cause break should end any kind of loop (innermost if nested loops).<br><br>One approach might be to iterate through the whole list of keywords, set some temp-variable if matched. Then, once the loop has completed, test for the presence of that variable, and take appropriate actions.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Jan 20, 2008 4:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dokueki]]></name></author>
		<updated>2008-01-20T15:30:35-04:00</updated>

		<published>2008-01-20T15:30:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80222#p80222</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80222#p80222"/>
		<title type="html"><![CDATA[Binding a certain ACTION CTCP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80222#p80222"><![CDATA[
I was trying to avoid that to make things simpler, but I guess I won't :P<br>Ok, so I have another question:<br>If several keywords appear in one message, the message is triggered for every one of them. How do I make it stop after only one trigger for each message? break didn't work :&lt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8949">dokueki</a> — Sun Jan 20, 2008 3:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-01-20T13:38:22-04:00</updated>

		<published>2008-01-20T13:38:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80220#p80220</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80220#p80220"/>
		<title type="html"><![CDATA[Binding a certain ACTION CTCP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80220#p80220"><![CDATA[
Bind against "ACTION", nothing else. Then within spidey:notify_tcl, test wether <em class="text-italics">text</em> contains any of your keywords.<br><br>Basically, Only the first word in a ctcp-message is the "key", the rest is the message/text/parameters/whatever. That's why you need to bind against "ACTION", and not "ACTION something".<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Jan 20, 2008 1:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dokueki]]></name></author>
		<updated>2008-01-20T10:07:24-04:00</updated>

		<published>2008-01-20T10:07:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80215#p80215</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80215#p80215"/>
		<title type="html"><![CDATA[Binding a certain ACTION CTCP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80215#p80215"><![CDATA[
Oh yeah I wasn't very descriptive &gt;_&lt; Sorry.<br>I wanted to say, that I need only certain action CTCPs to be binded. How would I go upon doing this? "ACTION*keyword*" doesn't seem to bind what I need, if you look inside the first foreach loop.<br><br>And oops, I didn't notice I put it here :x If someone could put it in the scripting help section, It'd be lovely.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8949">dokueki</a> — Sun Jan 20, 2008 10:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2008-01-20T09:38:00-04:00</updated>

		<published>2008-01-20T09:38:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80213#p80213</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80213#p80213"/>
		<title type="html"><![CDATA[Binding a certain ACTION CTCP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80213#p80213"><![CDATA[
Just a little confused, if you're just announcing the release of this script, or whether you needed help with something?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sun Jan 20, 2008 9:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dokueki]]></name></author>
		<updated>2008-01-20T04:30:47-04:00</updated>

		<published>2008-01-20T04:30:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=80208#p80208</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=80208#p80208"/>
		<title type="html"><![CDATA[Binding a certain ACTION CTCP]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=80208#p80208"><![CDATA[
I want to make a bind for an ACTION CTCP containing a certain word/words in them. Here's the script I made:<div class="codebox"><p>Code: </p><pre><code>#=================================================================================# ** Notification(c) 1.0 by Hen Asraf#=================================================================================# * What does it do?#---------------------------------------------------------------------------------#   Reads from the keywords list and sends a PM to every nick in the nicknames#   list whenever any of the keywords are mentioned in one of the bot's channels.#   It also sends the original time of which it was triggered to prevent the lag#   from causing a delay without the users knowing.##   Good for cases where the botmaster is asleep or away and wouldn't want to miss#   messages that were referring to them or something important.#=================================================================================# Set the keywords to trigger the notifier. Seperate with a space.set keywords "Spide Spidy kumo kami"# Set the nicknames to send the PM to. Seperate with a space.set nicknames "kumoKami"# MAIN ## Turn the keywords and nicknames variables into lists.set keywords [split $keywords ]set nicknames [split $nicknames ]# For each keyword in the list, bind the keyword to the spidey:notify procedure.foreach keyword $keywords {bind pubm * "*$keyword*" spidey:notifybind ctcp * "ACTION*$keyword*" spidey:notify_tcl}# Start procedureproc spidey:notify { nick host hand chan text } {# If the notified user said one of the keywords, you don't have to trigger the# messsage.foreach nickname $::nicknames {if { $nick != "$nickname" } {# Send the message in the following format:# (@time) [ #channel ] Nickname: Entire line containing the keyword(s)putserv "PRIVMSG $nickname :(@[strftime {%I:%M:%S %p}]) \[ $chan \] \002$nick:\002 \00312$text\003"}}}# Action procedure (/me)proc spidey:notify_tcl { nick host hand chan key text } {# If the notified user said one of the keywords, you don't have to trigger the# messsage.foreach nickname $::nicknames {if { $nick != "$nickname" } {# Send the message in the following format:# (@time) [ #channel ] Nickname: Entire line containing the keyword(s)putserv "PRIVMSG $nickname :(@[strftime {%I:%M:%S %p}]) \[ $chan \] \0036\002$nick\002 $text\003"}}}# When successfully loaded, put this line into the partyline for logging purposes.putlog "Notification 1.0 by Hen Asraf: Loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8949">dokueki</a> — Sun Jan 20, 2008 4:30 am</p><hr />
]]></content>
	</entry>
	</feed>
