Advertisement
westor

Channel ops/voices/normal statistics for VerDuGo v2.0

May 19th, 2023 (edited)
7,872
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.15 KB | None | 0 0
  1. alias statop {
  2.   var %total = $nick($chan,0)
  3.   var %ops_total = $nick($chan,0,o)
  4.   var %ops_per = $round($calc(%ops_total / %total * 100),0)
  5.   var %voices_total = $nick($chan,0,v)
  6.   var %voices_per = $round($calc(%voices_total / %total * 100),0)
  7.   var %normal_total = $nick($chan,0,r)
  8.   var %normal_per = $round($calc(%normal_total / %total * 100),0)
  9.  
  10.   if (%ops_total) {
  11.     var %i = 1
  12.     while (%i <= %ops_total) {
  13.       var %n = $nick($chan,%i,o)
  14.  
  15.       if (%n) && (!$istok(%ops_users,%n,44)) { var %ops_users = $addtok(%ops_users,%n,44) }
  16.  
  17.       inc %i
  18.     }
  19.   }
  20.  
  21.   if (%voices_total) {
  22.     var %i = 1
  23.     while (%i <= %voices_total) {
  24.       var %n = $nick($chan,%i,v)
  25.  
  26.       if (%n) && (!$istok(%voices_users,%n,44)) { var %voices_users = $addtok(%voices_users,%n,44) }
  27.  
  28.       inc %i
  29.     }
  30.   }
  31.  
  32.   if (%normal_total) {
  33.     var %i = 1
  34.     while (%i <= %normal_total) {
  35.       var %n = $nick($chan,%i,r)
  36.  
  37.       if (%n) && (!$istok(%normal_users,%n,44)) { var %normal_users = $addtok(%normal_users,%n,44) }
  38.  
  39.       inc %i
  40.     }
  41.   }
  42.  
  43.   echo -a Starting stats on $chan channel..
  44.   echo -a 14|---› 14Topic: $iif($chan($chan).topic,$v1,No topic has been set!)
  45.   echo -a 14|---› 14Modes: $iif($chan($chan).mode,$v1,No mode has been set!)
  46.   echo -a 14|---› %ops_total ( $+ %ops_per $+ $chr(37) $+ ) 14Ops: $iif(%ops_users,$v1,None)
  47.   echo -a 14|---› %voices_total ( $+ %voices_per $+ $chr(37) $+ ) 14Voice: $iif(%voices_users,$v1,None)
  48.   echo -a 14|---› %normal_total ( $+ %normal_per $+ $chr(37) $+ ) 14Normal: $iif(%normal_users,$v1,None)
  49.  
  50.   set -eu10 %ircops_scan $chan
  51.  
  52.   who $chan
  53. }
  54.  
  55. RAW 352:*: {
  56.   if (!%ircops_scan) { return }
  57.  
  58.   haltdef
  59.  
  60.   if (* isin $7) { set -eu10 %ircops_users $addtok(%ircops_users,$6,44) }
  61. }
  62.  
  63. RAW 315:*: {
  64.   if (!%ircops_scan) { return }
  65.  
  66.   haltdef
  67.  
  68.   var %total = $nick(%ircops_scan,0)
  69.   var %ircops_total = $numtok(%ircops_users,44)
  70.   var %ircops_per = $round($calc(%ircops_total / %total * 100),0)
  71.  
  72.   echo -a 14|---› %ircops_total ( $+ %ircops_per $+ $chr(37) $+ ) 14IRCops: $iif(%ircops_users,$v1,None)
  73.   echo -a End of $chan channel stats.
  74.  
  75.   unset %ircops_*
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement