MultiStats $identifier

By gooshie on Aug 13, 2009

$MultiStats identifier can be used in popups, remotes, echo'ed to any window etc etc

This snippet uses no /set %varibles that must be /unset when complete.
Also tried to make output more 'honest' by only counting connected servers,
joined channels, subtracting myself out of users count and only counting
most 'powerfull' mode (its possible to carry @%+ modes).
decided to count halfop/helpop as being opped and ignore founder/admin other
modes to keep it simple and easier for casual viewers to understand.

Inspired by tv3636's Multi-Server Personal Statistics
and knoeki's powertrip

Usage Examples:
ChanWindow Popup:me is $multistats
NickList Popup:say $1, sorry im so slow to respond but i am $multistats I will be with you in a moment.
on 1:RemoteEvent:!MultiStats:#?*:descripe $chan/$nick is $multistats
(add your own flood protection)

Example output:

  • gooshie is in 7 channels on 3 servers with 230 users. Opped in 2 channels and voiced in 3 channels. 2 queries open. Running mIRC version 6.35 on Windows Vista for 5 hours 1 minute.

Image

alias MultiStats {
  var %i1 1,%c,%s,%t,%o,%v,%u,%ov
  while $scon(%i1) {
    scid $v1
    if ($status = connected) {
      inc %s
      %u = $calc(%u + $ial(*,0) - $ial($address($me,2),0))
      var %i2 1
      while $chan(%i2) {
        %c = $v1
        if ($chan(%i2).status = joined) {
          inc %t
          if ($nick(%c,$me,~&@%)) { inc %o }
          elseif ($me isvoice %c) { inc %v }
        }
        inc %i2
      }
    }
    inc %i1
  }
  if (%o) { %o =  Opped in %o channel $+ $iif(%o = 1,,s) }
  if (%v) { %v = Voiced in %v channel $+ $iif(%v = 1,,s) }
  if (%o && %v) { %ov = %o and $lower(%v) }
  else { %ov = %o %v }
  if %ov { %ov = %ov $+ . }
  return in %t channel $+ $iif(%t = 1,,s) on %s server $+ $iif(%s = 1,,s) with %u users. %ov Running mIRC version $version $&
    on Windows $os for $replace($uptime(mirc,2),wk,$chr(32) week,day,$chr(32) day,hr,$chr(32) hour,min,$chr(32) minute) $+ .
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.