Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON *:TEXT:!top3:#:{ run_top3 $chan }
- alias run_top3 {
- var %tot = 3
- var %t = $lines(popularity.ini)
- if (!%t) { return }
- window -nj $+ %t @.
- loadbuf @. popularity.ini
- var %l = $line(@.,0)
- var %i = 1
- while (%i <= %l) {
- var %line = $line(@.,%i)
- rline @. %i $replace(%line,=,$chr(32))
- if (%i == %l) { dline @. 1 }
- inc %i
- }
- filter -cetuww 2 32 @. @.
- var %z 1
- while (%z <= %tot) {
- var %list = $addtok(%list,%z $+ . $line(@.,%z),44) $iif(%z !== %tot,-)
- inc %z
- }
- echo msg $1 Top %tot popularity are: $replace(%list,$chr(44),$+($chr(32)))
- window -c @.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement