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 

bind time

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Thu May 03, 2007 7:26 am    Post subject: bind time Reply with quote

Hi, can anyone please explain to me in detail about bind time ****** ... I don't get it, if you can give me a tutorial link or something liek that I will really appreciate that. Thanks.
_________________
|AmDeAtH @ Undernet


Death is only the *Beginning*...
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu May 03, 2007 9:46 am    Post subject: Reply with quote

www.google.com
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu May 03, 2007 10:10 am    Post subject: Reply with quote

doc/tcl-commands.doc wrote:
(37) TIME (stackable)
bind time <flags> <mask> <proc>
proc-name <minute> <hour> <day> <month> <year>

Description: allows you to schedule procedure calls at certain
times. mask matches 5 space separated integers of the form:
"minute hour day month year". minute, hour, day, month have a
zero padding so they are exactly two characters long; year is
four characters. Flags are ignored.
Module: core


Simply put, upon every HOOK_MINUTELY (every minute), a string is created such as this "<minute> <hour> <day> <month> <year>" (the same string could be generated using [clock format -format "%M %H %d %m %Y" [clock seconds]]). This is then matched against all time-bindings you've created (in a similar fashion to "string match", thus allowing wildcards such as *), and if it matches, the associated code is executed.

The mask "*" would match any time (and thus trigger every minute).
The mask "00 *" would match whenever the minute-part is 00 (triggers every hour on the hour).
The mask "* 01 *" would match whenever the hour, day, or month is 01 (or any combination of those) - probably not useful, and most scripters were probably intending a completely different result.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu May 03, 2007 2:31 pm    Post subject: Reply with quote

This should also be useful (from Tcl-commands.doc):
Quote:
*** MATCH CHARACTERS ***

Many of the bindings allow match characters in the arguments. Here
are the four special characters:

? matches any single character
* matches 0 or more characters of any type
% matches 0 or more non-space characters (can be used to match a single
word)
~ matches 1 or more space characters (can be used for whitespace between
words)

These match-characters can be used in the <mask> of binds (which accept wild cards).
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Thu May 03, 2007 3:59 pm    Post subject: Reply with quote

Thanks alot that was really useful, i'll use it in a script and let you know if there is any problem I am facing.
Thanks Smile
_________________
|AmDeAtH @ Undernet


Death is only the *Beginning*...
Back to top
View user's profile Send private message Visit poster's website
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Thu May 03, 2007 5:07 pm    Post subject: Reply with quote

Worth noting: the first month is 00, while the first day is 01 (and there's no mention of that in the docs)
_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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