mIRC Home    About    Download    Register    News    Help

Print Thread
#218925 28/02/10 03:16 AM
Joined: Jan 2009
Posts: 116
Knoeki Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Jan 2009
Posts: 116
It'd be nice, if not already possible (I haven't seen anything about it) if we could reference timers based on a wildcard. I suck at explaing it like this, so let me show examples:

$timer(bla.*, 0) - would return the number of timers that match bla.*
$timer(bla.*, 1) - would return info for the first timer matching bla.*

I hope I'm not overlooking this if it's in the manual...


http://zowb.net

/server -m irc.p2p-network.net -j #zomgwtfbbq
(ssl on port 6697 and 7000)
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This makes sense to me.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Sounds good to me. With a lot of timers, this can make it easier to check specific ones when testing scripts.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Until it's added (if it's added), you can do:

Code:
alias wtimer {
  var %i = 1, %n = 0
  while ($timer(%i)) {
    var %timer = $v1
    if ($1 iswm %timer) { 
      inc %n
      if ($2 == %n) return %timer
    }
    inc %i
  }
  if ($2 == 0) return %n
}


//echo -a $wtimer(bla.*, 0)
//echo -a $wtimer(bla.*, 1)

Not likely to have any real performance issues unless you have hundreds of timers running (which is likely to be a performance issue in itself).


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard