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.