Advertisement
westor

!top3 popularity addon for Wikked v1.0

Feb 7th, 2016
646
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.61 KB | None | 0 0
  1. ON *:TEXT:!top3:#:{ run_top3 $chan }
  2. alias run_top3 {
  3.   var %tot = 3
  4.   var %t = $lines(popularity.ini)
  5.   if (!%t) { return }
  6.   window -nj $+ %t @.
  7.   loadbuf @. popularity.ini
  8.   var %l = $line(@.,0)
  9.   var %i = 1
  10.   while (%i <= %l) {
  11.     var %line = $line(@.,%i)
  12.     rline @. %i $replace(%line,=,$chr(32))
  13.     if (%i == %l) { dline @. 1 }
  14.     inc %i
  15.   }
  16.   filter -cetuww 2 32 @. @.
  17.   var %z 1
  18.   while (%z <= %tot) {
  19.     var %list = $addtok(%list,%z $+ . $line(@.,%z),44) $iif(%z !== %tot,-)
  20.     inc %z
  21.   }
  22.   echo msg $1 Top %tot popularity are: $replace(%list,$chr(44),$+($chr(32)))
  23.   window -c @.
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement