mIRC Homepage
Posted By: Thray Timers - 04/10/03 05:50 PM
Ah, in the help file it says you can use wildcards in timers, and for the most part this is true...except for /timer -p and -r, pause and resume respectively.

So, two purposes for this post...
(A) To make sure Khaled knows in case its a bug
(B) See if anyone has a workaround?
Posted By: Othello Re: Timers - 04/10/03 11:38 PM
Its possible to use wildcard timers but in retrospect if you are using the timer to trigger I have always found it best to use the nick as part of the timers name to help with identifing a timer


.timer $+ av $+ $nick 1 600 mode $chan -v $nick

.timer $+ $nick 1 600 //TRIGGER $NICK
Posted By: starbucks_mafia Re: Timers - 05/10/03 12:50 AM
It would be nice as a feature if it could be done, I don't think it's a bug though as the Timers section in the helpfile only mentions wildcards with the off parameter. For now though it's simple enough to script.

Code:
pause_timers {
  ; Usage: /pause_timers <wildcard-timername>
  var %i = 1
  while $timer(%i) {
    var %t = $ifmatch
    if ($1 iswm %t) $+($iif(!$show,.),timer,%t) -p
    inc %i
  }
}

resume_timers {
  ; Usage: /resume_timers <wildcard-timername>
  var %i = 1
  while $timer(%i) {
    var %t = $ifmatch
    if ($1 iswm %t) $+($iif(!$show,.),timer,%t) -r
    inc %i
  }
}


Exactly the same code except for the switch, you might want to combine them into a single function with an extra parameter. They can accept a . prefix to silence the * Timer x paused messages.
© mIRC Discussion Forums