im not sure how many IRCD's support this method but i know UnReal does, you dont need to use a while loop to parse $snick
on *:INPUT:#: {
if ($regex($1-,/^\50(.+)\51$/) && $snick(#,0) && !$ctrlenter) {
var %a = $regml(1)
.notice $regsubex($str(.,$snick(#,0)),/(.)/g,$+($snick(#,\n),$iif(\n != \0,$chr(44)))) %a
haltdef
}
}