rendered paste bodyon 1:TEXT:!status:#what.cd-invites: {
if ($isfile(st.temp.txt)) { return }
var %i = 1, %chunk | write -c st.temp.txt
while ($read(queue.txt,%i)) {
var %n = $+(%i,.,$v1), %new = $addtok(%chunk,%n,32)
if ($len(%new) > 400) { write st.temp.txt %chunk | var %chunk = %n }
else { var %chunk = %new }
inc %i
}
if (%chunk) { write st.temp.txt $v1 }
.play $chan st.temp.txt
}
on *:PLAYEND: { if ($nopath($filename) == st.temp.txt) { .remove $qt($filename) } }
on 1:TEXT:!queue:#what.cd-invites:{ if ($read(queue.txt,w,$nick)) { notice $nick Already queued on position $readn } | else { write queue.txt $nick } }
on 1:TEXT:!next:#what.cd-invites: { if ($nick !ishop $chan) && ($nick !isop $chan) { return } | :retry | if ($read(queue.txt,1)) { var %nick = $v1 | write -dl1 queue.txt | if (%nick !ison $chan) { goto retry } | mode $chan +v %nick }