Wouldnt you use haltdef to say make your on join/part script where you can make the joins and part look how u want for instance: on *:JOIN:#: { haltdef | echo -a >> $nick has joined $chan }
/haltdef being the first command was not the problem. /haltdef can be placed anywhere in the script, unlike /halt. The problem was that you were missing the ^ prefix.
Actually the ^ prefix is for making the event trigger before the default action. /halt is what halts the default action. So, ^ is needed because it makes no sense to /halt something after it has happened.