egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

advertise timer

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
broot
Voice


Joined: 31 May 2009
Posts: 1

PostPosted: Sun May 31, 2009 5:51 pm    Post subject: advertise timer Reply with quote

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....
Back to top
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Fri Feb 01, 2013 5:28 pm    Post subject: Reply with quote

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:

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"
         }
      }
   }
}

_________________
https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber