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.

Time msg TCL

Old posts that have not been replied to for several years.
Locked
User avatar
Rusher2K
Halfop
Posts: 88
Joined: Fri Apr 18, 2003 10:45 am
Location: Germany
Contact:

Time msg TCL

Post by Rusher2K »

How can i display a msg in a chan every 10 minutes ?
Thx for Help
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

bind time - "10 * * * *" my:msg
proc my:msg {min hour day month year} {
putserv "PRIVMSG #channel :This is my 10 minutes timed message!"
}
Once the game is over, the king and the pawn go back in the same box.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

This is incorrect. THis makes it every 10 mins past the hour.

You can add more time binds like so.

Code: Select all

bind time - "00 * * * *" my:msg
bind time - "10 * * * *" my:msg
bind time - "20 * * * *" my:msg
bind time - "30 * * * *" my:msg
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Oups. Yes, forgot about it. Thanks for pointing it out.
Once the game is over, the king and the pawn go back in the same box.
User avatar
Rusher2K
Halfop
Posts: 88
Joined: Fri Apr 18, 2003 10:45 am
Location: Germany
Contact:

Post by Rusher2K »

must i make


bind time - "00 * * * *" my:msg
bind time - "10 * * * *" my:msg
bind time - "20 * * * *" my:msg
bind time - "30 * * * *" my:msg
bind time - "40 * * * *" my:msg
bind time - "50 * * * *" my:msg
bind time - "60 * * * *" my:msg
bind time - "70 * * * *" my:msg
bind time - "80 * * * *" my:msg
bind time - "90 * * * *" my:msg
bind time - "100 * * * *" my:msg

?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Actualy it's

Code: Select all

bind time - "00 * * * *" my:msg
bind time - "10 * * * *" my:msg
bind time - "20 * * * *" my:msg
bind time - "30 * * * *" my:msg
bind time - "40 * * * *" my:msg
bind time - "50 * * * *" my:msg

proc my:msg {min hour day month year} { 
  putserv "PRIVMSG #channel :This is my 10 minutes timed message!" 
}
Once the game is over, the king and the pawn go back in the same box.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

No, you can't have 60, 70, 80, 90 or 100 mins pastt eh hour.
User avatar
Rusher2K
Halfop
Posts: 88
Joined: Fri Apr 18, 2003 10:45 am
Location: Germany
Contact:

Post by Rusher2K »

OK thx it works
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

caesar : what about this way ?

Code: Select all

if {[lsearch -glob [timers] "* my:msg *"] == -1} { timer 10 my:msg }

proc my:msg {min hour day month year} { 
if {[lsearch -glob [timers] "* my:msg *"] == -1} { timer 10 my:msg }  
putserv "PRIVMSG #channel :This is my 10 minutes timed message!" 
} 
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Or , hell, to save using timers, and having them break on you

Code: Select all

bind time - "*" my:msg 
proc my:msg {min hour day month year} { 
  if {[string index $min 0] == "0"]} { set min [string index $min 1] }
  if {[expr $min % 10]} { return }
  putserv "PRIVMSG #channel :This is my 10 minutes timed message!" 
}
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

how about: 'bind time - "?0 *" proc'? the last digit of the minutes is 0 every 10 minutes, right? :)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

True
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

True.. true.. :) great alternatives.
Once the game is over, the king and the pawn go back in the same box.
Locked