Advertisement
westor

!top10 fixed command

Nov 2nd, 2014
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.88 KB | None | 0 0
  1. alias top10m {
  2.   var %f = stats.ini
  3.   if (!$isfile(%f)) { return }
  4.   if (!$lines(%f)) { return }
  5.   unset %top_nick
  6.   if ($window(@.)) { window -c @. }
  7.   if ($window(@ok)) { window -c @ok }
  8.   window -h @.
  9.   window -h @ok
  10.   loadbuf $lines(%f) @. $qt(%f)
  11.   var %t = $line(@.,0)
  12.   var %i = 1
  13.   while (%i <= %t) {
  14.     var %l = $line(@.,%i)
  15.     if (*messages* iswm %l) && (%top_nick) { aline @ok %top_nick $remove(%l,messages=) | unset %top_nick | goto next }
  16.     if ($left(%l,1) == [) {
  17.       var %tmp = $remove(%l,[,])
  18.       set -e %top_nick $gettok(%tmp,2,46)
  19.     }
  20.     :next
  21.     inc %i
  22.   }
  23.   unset %top_nick
  24.   filter -cetuww 2 32 @ok @ok
  25.   var %ii 1
  26.   while (%ii <= 10) {
  27.     var %list = $addtok(%list,$line(@ok,%ii),44)
  28.     inc %ii
  29.   }
  30.   msg $1 [ $+ $1 $+ ]: TOP10 Stats (messages) are: $replace(%list,$chr(44),$+($chr(44),$chr(32)))
  31.   window -c @ok
  32.   window -c @.
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement