mIRC Homepage
Posted By: westor ON TIMEROFF,END - ON TIMERON,START - 08/01/10 05:03 PM
Hello,

I am not sure that this can be added but i want to suggest it, when using the /timerMYTIMER off and have this example event is it possible to be worked?

e.g: ON *:TIMEROFF:MYTIMER: { echo -s The $v1 timer has been ended, do now "/rr_mytimer" to start again }

alias rr_mytimer { timerMYTIMER 0 90 echo -s This is MYTIMER timer for example }


Also add the ON *:TIMERSTART:MYTIMER: { echo -s The $v1 timer has been started, do now "/timerMYTIMER off" to end it! }

thanks!
Posted By: argv0 Re: ON TIMEROFF,END - ON TIMERON,START - 08/01/10 11:45 PM
In general, there's no reason to have an event for a command that you directly issue ("directly" as opposed to "indirectly" from an IRC server or outside source, for instance). For example, if you're already issuing /timerN off, you can just put the event code right after (and move it all to an alias for organization purposes). Same goes for ON TIMERON.. just call the command when you /timer

However, there's one scenario where TIMEROFF might be helpful, and that's for timers with N > 1 repetitions-- though you can still handle it in your timer command, so it's not really necessary.
Posted By: RoCk Re: ON TIMEROFF,END - ON TIMERON,START - 09/01/10 05:27 PM

It looks to me as if someone wants to prevent users from stopping timers that their script has started.

Code:

on *:TIMEROFF:MYTIMER: {
  timerMYTIMER 0 90 echo -s This is MY TIMER and you may not stop it!!
}


Posted By: westor Re: ON TIMEROFF,END - ON TIMERON,START - 10/01/10 03:29 PM
Yes RoCk you're right that i want to say! this could be possible to be added?
Posted By: argv0 Re: ON TIMEROFF,END - ON TIMERON,START - 11/01/10 12:25 AM
@westor: That's an argument *against* adding it.

Users should be able to stop any timer they wish. In fact, I'd consider any script that forces a timer back on as somewhat malicious in intent.
Posted By: qwerty Re: ON TIMEROFF,END - ON TIMERON,START - 11/01/10 04:50 AM
I agree that forcing a /timer down the user's throat is bad, but I often find myself doing a /timers off when I want to turn off a particular timer gone astray, just because I can't remember its name (or even worse its number). In such cases, I would actually appreciate an automatic restart of a /timer that I know I need.

A possible solution to the problem would be a new /timer switch (eg -x) that would prevent the on TIMEROFF event from firing.
Posted By: argv0 Re: ON TIMEROFF,END - ON TIMERON,START - 11/01/10 06:45 AM
An even better solution to that scenario would be /timers pause so you could inspect the situation (/timers -l), stop the rogue timers and /timers resume when you're done
Posted By: westor Re: ON TIMEROFF,END - ON TIMERON,START - 11/01/10 10:42 AM
anyway guys i think one of those events will be very helpfull!
Posted By: s00p Re: ON TIMEROFF,END - ON TIMERON,START - 11/01/10 11:10 AM
Yes, because I'd love to be able to do something like:
Code:
on ^1:TIMEROFF:*: {
  .timer* off
  halt
}
Posted By: qwerty Re: ON TIMEROFF,END - ON TIMERON,START - 11/01/10 04:44 PM
Apart from the fact that /timers -p/r doesn't work (these switches don't support multiple timers/wildcards), I find having to issue 3 commands a bit cumbersome.
© mIRC Discussion Forums