I'm aware of $sorttok, I was just wondering if there was an exception, like if I was able to sort a file with a simple command.
I've made something that "kind of works" now, but I hoped there was an easier way.
idle {
.remove moo.txt
var %total = $nick(#,0)
var %lylz = 0
while (%total) {
inc %lylz
.write moo.txt $nick(#,%lylz).idle $nick(#,%lylz)
dec %total
}
set %idle.lines $lines(moo.txt)
unset %yawn
unset %idle.results
while (%idle.lines) {
inc %yawn
dec %idle.lines
set %idle.results %idle.results $+ . $+ $gettok($read(moo.txt,%yawn),1,32)
}
set %idle.results $sorttok(%idle.results,46,a)
set %neee $numtok(%idle.results,46)
unset %yawn
while (%neee) {
inc %yawn
echo -a %yawn . $+ $read(moo.txt,s,$gettok(%idle.results,1,46)) - $duration($gettok(%idle.results,1,46))
set %idle.results $remove(%idle.results,$gettok(%idle.results,1,46) $+ .)
dec %neee
}
}