You could add:
on *:RAWMODE:#: { if ($1 == -n) { timern 1 2 mode $chan +n } if ($1 == +n) && ($timer(n) != $null) { timern off } }