Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; For AdiIRC v3.4+
- ON *:LOAD: {
- if ($active == $chan) { update_opstats $chan }
- }
- ON *:UNLOAD: { .timer[OPS_STATS] off | close_opstats }
- ON *:QUIT: { if ($active ischan) { .timer[OPS_STATS] -h 1 1500 update_opstats $active } }
- ON *:JOIN:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:PART:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:OWNER:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:DEOWNER:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:ADMIN:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:DEADMIN:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:OP:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:DEOP:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:HELP:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:DEHELP:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:VOICE:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:DEVOICE:#: { if ($active == $chan) { .timer[OPS_STATS] -h 1 1500 update_opstats $chan } }
- ON *:APPACTIVE: {
- .timer[OPS_STATS] off
- close_opstats
- if ($appactive) && ($active ischan) { update_opstats $target }
- }
- ON *:ACTIVE:*: {
- .timer[OPS_STATS] off
- close_opstats
- if ($target ischan) { .timer[OPS_STATS] -h 1 500 update_opstats $target }
- }
- alias close_opstats {
- if ($statusbar(opstatsep)) { statusbar -h opstatsep }
- if ($statusbar(opstats)) { statusbar -h opstats }
- }
- alias update_opstats {
- if (!$1) || ($status !== connected) || ($active !ischan) || ($1 !ischan) { close_opstats | return }
- var %t = $nick($1,0)
- var %prefix = $prefix
- var %owners = 0
- var %admins = 0
- var %ops = 0
- var %halfops = 0
- var %voicers = 0
- var %i = 1
- while (%i <= %t) {
- var %p = $nick($1,%i).cmode
- if (*~* iswm %prefix) && (~ == %p) { inc %owners 1 }
- if (*&* iswm %prefix) && ($chr(38) == %p) { inc %admins 1 }
- if (*@* iswm %prefix) && (@ == %p) { inc %ops 1 }
- if (*%* iswm %prefix) && ($chr(37) == %p) { inc %halfops 1 }
- if (*+* iswm %prefix) && (+ == %p) { inc %voicers 1 }
- inc %i
- }
- var %line = $iif(*~* iswm %prefix,Owners: %owners $chr(166)) $iif(*&* iswm %prefix,Admins: %admins $chr(166)) $iif(*@* iswm %prefix,Ops: %ops $chr(166)) $iif(*%* iswm %prefix,HalfOps: %halfops $chr(166)) $iif(*+* iswm %prefix,Voicers: %voicers $chr(166)) Regular: $nick($1,0,r)
- if (!$statusbar(opstatsep)) { statusbar -a opstatsep $qt() $chr(160) $qt() | return }
- if (!$statusbar(opstats)) { statusbar -a opstats $qt(%line) @opstats $qt(%line) | return }
- statusbar -w opstatsep
- statusbar -wg opstats $qt(%line)
- }
- menu @opstats {
- Announce in $active $+ :say Currenly on $active are: $statusbar(opstats).text
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement