Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias statop {
- var %total = $nick($chan,0)
- var %ops_total = $nick($chan,0,o)
- var %ops_per = $round($calc(%ops_total / %total * 100),0)
- var %voices_total = $nick($chan,0,v)
- var %voices_per = $round($calc(%voices_total / %total * 100),0)
- var %normal_total = $nick($chan,0,r)
- var %normal_per = $round($calc(%normal_total / %total * 100),0)
- if (%ops_total) {
- var %i = 1
- while (%i <= %ops_total) {
- var %n = $nick($chan,%i,o)
- if (%n) && (!$istok(%ops_users,%n,44)) { var %ops_users = $addtok(%ops_users,%n,44) }
- inc %i
- }
- }
- if (%voices_total) {
- var %i = 1
- while (%i <= %voices_total) {
- var %n = $nick($chan,%i,v)
- if (%n) && (!$istok(%voices_users,%n,44)) { var %voices_users = $addtok(%voices_users,%n,44) }
- inc %i
- }
- }
- if (%normal_total) {
- var %i = 1
- while (%i <= %normal_total) {
- var %n = $nick($chan,%i,r)
- if (%n) && (!$istok(%normal_users,%n,44)) { var %normal_users = $addtok(%normal_users,%n,44) }
- inc %i
- }
- }
- echo -a Starting stats on $chan channel..
- echo -a 14|---› 14Topic: $iif($chan($chan).topic,$v1,No topic has been set!)
- echo -a 14|---› 14Modes: $iif($chan($chan).mode,$v1,No mode has been set!)
- echo -a 14|---› %ops_total ( $+ %ops_per $+ $chr(37) $+ ) 14Ops: $iif(%ops_users,$v1,None)
- echo -a 14|---› %voices_total ( $+ %voices_per $+ $chr(37) $+ ) 14Voice: $iif(%voices_users,$v1,None)
- echo -a 14|---› %normal_total ( $+ %normal_per $+ $chr(37) $+ ) 14Normal: $iif(%normal_users,$v1,None)
- set -eu10 %ircops_scan $chan
- who $chan
- }
- RAW 352:*: {
- if (!%ircops_scan) { return }
- haltdef
- if (* isin $7) { set -eu10 %ircops_users $addtok(%ircops_users,$6,44) }
- }
- RAW 315:*: {
- if (!%ircops_scan) { return }
- haltdef
- var %total = $nick(%ircops_scan,0)
- var %ircops_total = $numtok(%ircops_users,44)
- var %ircops_per = $round($calc(%ircops_total / %total * 100),0)
- echo -a 14|---› %ircops_total ( $+ %ircops_per $+ $chr(37) $+ ) 14IRCops: $iif(%ircops_users,$v1,None)
- echo -a End of $chan channel stats.
- unset %ircops_*
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement