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

	<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-12-20T14:08:49-04:00</updated>

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

		<entry>
		<author><name><![CDATA[annmary]]></name></author>
		<updated>2011-12-20T14:08:49-04:00</updated>

		<published>2011-12-20T14:08:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98414#p98414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98414#p98414"/>
		<title type="html"><![CDATA[Channel message with variable number and frequency via query]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98414#p98414"><![CDATA[
thank you so much<strong class="text-strong"> willyw</strong> <br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11852">annmary</a> — Tue Dec 20, 2011 2:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2011-12-10T10:47:41-04:00</updated>

		<published>2011-12-10T10:47:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98377#p98377</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98377#p98377"/>
		<title type="html"><![CDATA[Channel message with variable number and frequency via query]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98377#p98377"><![CDATA[
Makes bot react to a specific /msg.  In this case, "announce". <br>The single letter -  m  -  is a limiting flag... in your example, the user send the /msg must have a user record in the bot, and have the m flag.  If not, the /msg is ignored.<br>If a user does have the m flag, and sends /msg announce to the bot, bot will react by running procedure named pAnnounceBind.<br><br>This is an excellent reference for all the binds (and other TCL Eggdrop commands):<br><a href="http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html#binda" class="postlink">http://www.eggheads.org/support/egghtml ... html#binda</a><br><br>I think this is a very good site for beginning with TCL for Eggdrop:<br><a href="http://suninet.the-demon.de/" class="postlink">http://suninet.the-demon.de/</a><br>Even though it is old, it gets you started.  It is easy to read, and easy to understand.<br><br>For your specific question, here is the link: <br><a href="http://suninet.the-demon.de/04.htm" class="postlink">http://suninet.the-demon.de/04.htm</a><br><br><br>p.s.<br>I see this is your first post here.  Welcome!<br>Tip: If you have more questions about this, it would be better if you start your own thread.   Probably in the Scripting Help section.<br><a href="http://forum.egghelp.org/" class="postlink">http://forum.egghelp.org/</a><br><br><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=10420">willyw</a> — Sat Dec 10, 2011 10:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[annmary]]></name></author>
		<updated>2011-12-10T08:43:28-04:00</updated>

		<published>2011-12-10T08:43:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98375#p98375</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98375#p98375"/>
		<title type="html"><![CDATA[Channel message with variable number and frequency via query]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98375#p98375"><![CDATA[
hi, I have a question, <br>what is the meaning of this command<br>"<br> bind MSG m announce pAnnounceBind <br>"<br>cheers.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11852">annmary</a> — Sat Dec 10, 2011 8:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2011-10-01T08:56:56-04:00</updated>

		<published>2011-10-01T08:56:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97827#p97827</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97827#p97827"/>
		<title type="html"><![CDATA[Channel message with variable number and frequency via query]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97827#p97827"><![CDATA[
Give this a try. I've done some minimal testing<br><div class="codebox"><p>Code: </p><pre><code># announce.tcl# /msg &lt;botnick&gt; announce ?#channelname? ?frequency? ?number? &lt;message&gt;# first announcement will be after 1 minute, thereafter at the frequency specified### ----------------------------------------------------------------------- ###### ---------- Configuration (edit as required) --------------------------- #### set here the default bot channel for announcementsset vAnnounceDefaultChannel "#eggtcl"# set here the default frequency in minutes that the announcement is madeset vAnnounceDefaultFrequency 2# set here the default number of times the announcement is madeset vAnnounceDefaultNumber 10### ----------------------------------------------------------------------- ###### ---------- Code (do not edit) ----------------------------------------- ###bind MSG m announce pAnnounceBindproc pAnnounceBind {nick uhost hand text} {    global vAnnounceDefaultChannel vAnnounceDefaultFrequency vAnnounceDefaultNumber    regexp -- {^(#[^\s]+\s)?([1-9][0-9]*\s)?([1-9][0-9]*\s)?(.+)?} [regsub -all -- {\s{2,}} [string trim $text] { }] -&gt; channel frequency number message    if {[string length $channel] == 0} {set channel $vAnnounceDefaultChannel} else {set channel [string trimright $channel]}    if {[string length $frequency] == 0} {set frequency $vAnnounceDefaultFrequency} else {set frequency [string trimright $frequency]}    if {[string length $number] == 0} {set number $vAnnounceDefaultNumber} else {set number [string trimright $number]}    if {[string length $message] != 0} {        if {[validchan $channel]} {            putserv "NOTICE $nick :announcing message at $frequency minute intervals $number time(s) in $channel"            for {set loop 0} {$loop &lt; $number} {incr loop} {                timer [expr {($loop * $frequency) + 1}] [list pAnnounceMessage $channel $message]            }        } else {putserv "NOTICE $nick :bot does not have a channel record for $channel"}    } else {putserv "NOTICE $nick :usage /msg &lt;botnick&gt; announce ?#channelname? ?frequency? ?number? &lt;message&gt;"}    return 0}proc pAnnounceMessage {channel message} {    if {[botonchan $channel]} {        putserv "PRIVMSG $channel :$message"    }    return 0}# eof</code></pre></div>*** edited, adding ^ to beginning of regexp pattern to ensure arguments are only matched from the start of the text<br>*** also added m flag to bind, to ensure only global master or above can use it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Sat Oct 01, 2011 8:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[needhelp2]]></name></author>
		<updated>2011-09-24T20:13:36-04:00</updated>

		<published>2011-09-24T20:13:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=97777#p97777</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=97777#p97777"/>
		<title type="html"><![CDATA[Channel message with variable number and frequency via query]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=97777#p97777"><![CDATA[
Hello, I have searched quite extensively for a script, that will send a message to a channel, variable number of times. The closest  I have found, is darkbot's repeat command, but that is not an eggdrop. <br><br>  I would be thankful, if someone were to replicate the feature in eggdrop form, for me.The default being, that it would start as soon as you give the message/announcement, every hour, for a day. So, an example of the default behavior would be "/msg bot message", where the message/announcement would repeat, as soon as it was sent, every hour, for a day. If the command was issued at 11:23 AM 09/26/2011, the final annoucement would be at 10:23 AM 09/27/2011. Also, another example would be, "/msg bot 15 8 message" - it would send the message/announcement every 15 minutes, eight times and then stop.<br><br>  I do appreciate your help on the matter, greatly. <br>  <br>  Thank you. <br>  <br>  Cheers,<br>  <br>  needhelp<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11793">needhelp2</a> — Sat Sep 24, 2011 8:13 pm</p><hr />
]]></content>
	</entry>
	</feed>
