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.

Timed Message

Old posts that have not been replied to for several years.
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Timed Message

Post by NewzUK »

Hi

Just wondering if anyone has come across a script that sends a message to a channel at a certain actual time (eg 12:00) as opposed to a timed msg every x minutes...

Have had a look around but can't see one...

Thanks in advance!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Basicaly this sounds like an antiidle script. Go to TCL Archive and search there for one. And/or you can make yourself one using 'bind time'. For this look in the tcl-commands.doc file located in the doc/ dir.
Once the game is over, the king and the pawn go back in the same box.
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

thanks will take a look! of course also if anyone else has already seen one out there, I'd like to hear about that too :)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Oh, also look for a channel advert thing.. It's more apropiate to what you need.
Once the game is over, the king and the pawn go back in the same box.
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

thanks - hopefully there's one that will do clock/time-based rather than every x minutes etc ;)
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

this is so easily made by yourself that it will probably be more work searching through the tcl-archive..... hint.... bind time <--- ;)
Elen sila lúmenn' omentielvo
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I already gave him that hint but seems that he didn't catch the hint :)
Once the game is over, the king and the pawn go back in the same box.
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

yes I got the hint thanks - was just asking the question.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

# Set this in the format "MIN:HOUR:DAY:MONTH:YEAR"
# Not all fields are needed. THe more included, the more precices the timer
# Feilds can be omited, by leaving them blank. All feilds are 2 digits (though year may be 4)
# EG
# Miday = 00:12
# Every hour = 00
# Every hour, only on the 2nd of the month = 00::02
set timemask "00:12"

set timemsg "PRIVMSG #channel :Our message goes here, in IRCD command format"

bind time - "*" message:timed
proc message:times {args} {
  global timemask timemsg
  set idx 0
  set temp [split $timemask :]
  foreach a $args {
    if {([lindex $temp $idx] == [lindex $args $idx]) || ([lindex $temp $idx] == "")} {
      incr idx
      continue
    } else {
      return
    }
  }
  puthelp $timemsg
}
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

ppslim helped me make a timed notice for my channel. Went off every 15 minutes and send a general notice to the channel. Wouldnt be too hard to modify for this purpose
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

thank you very much ppslim and others :)
a
acm

Post by acm »

Code: Select all

...
bind time - "*" message:timed 
proc message:times {args} { 
...
shouldn't that be:

Code: Select all

...
bind time - "*" message:timed 
proc message:timed {args} { 
...
acm
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

yup yup
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

thanks acm for that - it's now working - and thanks to all for your help on this...

=)
N
NewzUK
Master
Posts: 200
Joined: Mon Nov 18, 2002 3:10 am
Location: Auckland, New Zealand
Contact:

Post by NewzUK »

one more thing on this, if I want to make multiple msgs that show at different specific times, do I just make more of these:

set timeask
set timesg

and if so, do they have to be called different things?

basically I'm setting up 24 different msgs that run at the top of the hour that display the time and a msg to the channel.

thanks.
Locked