This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

advertise timer

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
b
broot
Voice
Posts: 1
Joined: Sun May 31, 2009 5:40 pm

advertise timer

Post by broot »

I been searching for a script that can manage multiple messages, multiple channels, and multiple intervals.

I found a few scripts close to what I am looking for but not exact. Example script --- SendMsg 1.1 by WPnL

It allows you to type multiple messages which sends to a list of channels you define BUT they all send based on the same interval. ALSO it sends the exact same messages to all channels.

What I am looking for the script to actual do is set
Chan -> Interval(in mins) -> Message
Example:
#chan1 20 "message here #1"
#chan2 10 "message here #2"
#chan3 45 "message here #3"

As you can see there is 3 different channels 3 defined with 3 different intervals for those channels defined and each sends 3 different messages which is defined to those channels....
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

I just tested the variables so that they will be as they should be and it should work perfectlly (this is my version at this points i really think it can be done much easier yet this is a working version)

Code: Select all

bind time - * check:adv

set adv(#chan1) "10 message1"
set adv(#chan2) "20 message2"

proc check:adv {min hour day month year} {
	global adv

	if {![llength [timers]]} {
		foreach a [array names adv] {
			timer [lindex [split $adv($a)] 0] [list putserv "PRIVMSG $a :[join [lrange $adv($a) 1 end]]"]

			putlog "adaugat $a"
		}
	} else {
		foreach a [array names adv] {
			if {![string match -nocase "*$a*" [timers]]} {
				timer [lindex [split $adv($a)] 0] [list putserv "PRIVMSG $a :[join [lrange $adv($a) 1 end]]"]

				putlog "doar $a"
			}
		}
	}
}
Post Reply