mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Hey, Mr. Khaled,

Do me a solid and allow me to capture an event or signal when a variable and when a hashtable entry unsets due to -u or -z switches. This would make it a WHOLE lot easier to write bots that have expiring bans or quiets or re-voice other throttles that don't necessarily need a million redundant /timers to be set when the VAR or HASHITEM already knows when it has expired.

mIRC already fires an internal event whenever these objects unset themselves, and I would like to hook into that myself. (Full disclosure: Status window will show these items being unset if the -s switch is used when they were set.)

Thanks.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Uhm, mIRC is already slow enough as it is.. I think that if anything here, it should be possible to specify a callback alias with /set and /hadd that gets called whenever the thing expires.


Saturn, QuakeNet staff
Joined: Aug 2016
Posts: 57
R
Babel fish
Offline
Babel fish
R
Joined: Aug 2016
Posts: 57
As long as it does not disrupt mIRC performance.

However I believe it is unnecessary because it is possible to get satisfactory results with /timer.

Exemple: /haddz HASH ITEM N

Code:
alias haddz {
  hadd -z $1-
  .timerhaddz $+ $ticks $+ $rand(111,999) 1 $3 unsethash $1-2
}
alias unsethash {
  if ($hget($1,$2)) .timerhaddz $+ $ticks $+ $rand(111,999) 1 $v1 unsethash $1-2
  else {
    ; Unseted hash item
    echo -s unset item $2 on hash $1
  }
}

Last edited by rockcavera; 10/02/17 07:43 PM.

rockcavera
#Scripts @ irc.VirtuaLife.com.br

Link Copied to Clipboard