I've decided to make a script to alert people when something in a game happens.
The way this work is this, a user will add a date/time like this:
!add May-15@12:00pm Description
Now I have a few questions, first being is how can I convert that date/time to unix format?
My other question is once i've converted it to unix time, how can I get the bot to say something to the channel exactly an hour before that time. So in this case, at 11:00am its gotta message something like "1 Hour till time".
Is this possible? I can handle things if I just figure out these two questions.
I did some playing around and so far I got that working. I'm stuck when it comes to adding a date to it. This only works for HH:MM, preferably, i want users to type in:
bind time - * time:check
proc time:check {min hour args} {
# check in here to see if hour:min is before your time in question
# (or just use the system's time again)
}
the time binding will be called once a minute...
just add code..