Thanks, that worked.
But now I'm stuck with another problem:
on *:rawmode:#:{
echo # $timestamp 15-10--9 $nick sets mode:10 $1-
haltdef
}
It shows my custom message but also the original message. I thought it would disappear when using haltdef?
/edit: nevermind, I changed the accesslevel from * to *^ and now it doesn't show the original message.