Multi-Server Personal Statistics

By tv3636 on Aug 02, 2009

[size=18]Usage[/size] Paste the code below into a Remote file. Type /myinfo to describe your statistics to the channel.

[size=18]Info[/size] I searched and I saw a few kind of similar snippets but none that were quite the same (and I didn't see a multi-server one but maybe I just fail at searching) so I decided I'd submit this. I left out half-op count because I'm not half-opped anywhere (and 3/4 of the servers I use don't have half-ops anyhow) but if you all think I should add it I could easily.

[size=18]Comments[/size] I couldn't think of anything else to add but if you have a suggestion please let me know, thanks. Also I haven't really used scon before so if there is a better/easier way of doing something like this let me know as well.

alias myinfo {
  set %info.totalchannels 0
  set %info.opchannels 0
  set %info.voicechannels 0
  set %info.query 0
  scon -a gatherinfo
  describe $active is in %info.totalchannels channel $+ $iif(%info.totalchannels != 1,s,) on $scon(0) server $+ $iif($scon(0) != 1,s,) $+ .  $&
    Opped in %info.opchannels channel $+ $iif(%info.opchannels != 1,s,) and voiced in %info.voicechannels channel $+ $iif(%info.voicechannels != 1,s,) $+ .  $&
    %info.query quer $+ $iif(%info.query != 1,ies,y) open.  Running mIRC version $version for $dur($uptime(mirc,3)) $+ .
  unset %info.*
}

alias gatherinfo { 
  var %x = $chan(0)
  set %info.query $calc(%info.query + $query(0))
  while %x {
    inc %info.totalchannels
    if ($me isop $chan(%x)) inc %info.opchannels
    if ($me isvoice $chan(%x)) inc %info.voicechannels
    dec %x
  }
}

alias dur {
  return $replace($duration($1),wk,$chr(32) $+ week,day,$chr(32) $+ day,hr,$chr(32) $+ hour,min,$chr(32) $+ minute,sec,$chr(32) $+ second)
}
Sign in to comment.
tv3636   -  Aug 11, 2009

Thanks for pointing out the typo. As for saving a keystroke...ok but really who cares :p And I think setting and unsetting simplifies things here..no variables are stored so it's not really a big deal. To each his own though.

 Respond  
gooshie   -  Aug 10, 2009

Good idea making this work multiserver.

Like the $dur replace identifier [no need for the $+ after the $chr(32)]

Like the $iif(%info.opchannels != 1,s,) things but save a keystroke with $iif(%info.opchannels = 1,,s)

Typo in describe output in this section: voiced in %info.opchannels channel $+ $iif(%info.opchannels != 1,s,) should be of course %info.voicechannels

dont like /set %varibles unnecessary writes to harddrive and need for /unset

Heavily influenced my snippet at: http://www.hawkee.com/snippet/6559/

 Respond  
VinX   -  Aug 03, 2009

i think this is similar the the /powertrip one

here : http://www.hawkee.com/snippet/6414/

thanks anyways ;)

 Respond  
Jethro   -  Aug 02, 2009

opps I saw it wrong..lol Excuse me. I thought your %info variables were all the same. Apparently they weren't. Keep up the good work is all I have to say. :P

 Respond  
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.