on *:join:#:haltdef
on *:quit:#:haltdef
on *:part:#:haltdef
don`t do anything...
try halt
or if you mirc to not show you messages for those events:
on ^*:join:#:/haltdef
on ^*:quit:#:/haltdef
on ^*:part:#:/haltdef
Just to explain why DJ_Sol's code works:
You have to use the ^ event prefix with most events for /haltdef to have an effect. on ^*:join:#:{ } will work, but on *:join:#:{ } will not.
An exception to this rule is the on input event, and probably a couple of others.