mIRC Home    About    Download    Register    News    Help

Print Thread
#52487 04/10/03 05:50 PM
Joined: Jun 2003
Posts: 114
T
Thray Offline OP
Vogon poet
OP Offline
Vogon poet
T
Joined: Jun 2003
Posts: 114
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?


-------------
I am the self-appointed God of needlessly complex mIRCscript.
#52488 04/10/03 11:38 PM
Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
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




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
#52489 05/10/03 12:50 AM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard