Originally Posted By: Bramzee
Code:
on *:TEXT:!top10:#:{
  if  ($nick isop #) { top10 # } 
  else { msg # You are not allowed to use !top10. }
}

alias -l top10 {
  window -h @. | var %i 1
  while $gettok($remove($read(points.ini,w,$+(*,$1,*),%i),[,]),2,46) {
    var %n $v1, %p $gettok($read(points.ini,$calc($readn + 1)),2,61)
    aline @. %n %p
    var %i $calc($readn + 1)
  }
  filter -cetuww 2 32 @. @.
  var %i 1 | while %i <= 10 {
    var %list $addtok(%list,$line(@.,%i),44)
    inc %i
  }
  msg $1 Top 10 point are: $replace(%list,$chr(44),$+($chr(44),$chr(32)))
  window -c @.
}


how would it work if i had a .ini that looks like that:
Code:
[#channel.nick1]
a=2

[#channel.nick2]
a=3
b=5


+ is there a more efficient way? because it takes about 1 minute for a 4085 lines .ini

Last edited by patrickplays; 11/10/14 09:17 PM.