Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias top10m {
- var %f = stats.ini
- if (!$isfile(%f)) { return }
- if (!$lines(%f)) { return }
- unset %top_nick
- if ($window(@.)) { window -c @. }
- if ($window(@ok)) { window -c @ok }
- window -h @.
- window -h @ok
- loadbuf $lines(%f) @. $qt(%f)
- var %t = $line(@.,0)
- var %i = 1
- while (%i <= %t) {
- var %l = $line(@.,%i)
- if (*messages* iswm %l) && (%top_nick) { aline @ok %top_nick $remove(%l,messages=) | unset %top_nick | goto next }
- if ($left(%l,1) == [) {
- var %tmp = $remove(%l,[,])
- set -e %top_nick $gettok(%tmp,2,46)
- }
- :next
- inc %i
- }
- unset %top_nick
- filter -cetuww 2 32 @ok @ok
- var %ii 1
- while (%ii <= 10) {
- var %list = $addtok(%list,$line(@ok,%ii),44)
- inc %ii
- }
- msg $1 [ $+ $1 $+ ]: TOP10 Stats (messages) are: $replace(%list,$chr(44),$+($chr(44),$chr(32)))
- window -c @ok
- window -c @.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement