Why make things so complicated?
Say Hi: {
var %tnicks = $snick(#,0)
var %x = 1
while (%x <= %tnicks) {
msg $active Hi $snick(#,%x)
inc %x
}
}