I think you can just use /scon -at1 rather than a while loop through the scon():
alias heartbroken { .enable #heart } #heart on on *:TEXT:*:#: { /scon -at1 /msg #your-channel $server $chan = $time = $+ $nick $+ -> $1- } #heart end on *:disconnect: { .disable #heart } on *:Exit: { .disable #heart }