This:> ON *:JOIN:#: {
if ($nick == $me) || ($nick == YOURNAME) || ($nick == BOTNAME) halt
Should be:
ON !*:JOIN:#: {
if ($nick != BOTNAME) {
The ! prefix tells mirc not to trigger on your own join. The nick == $me is not required since ! will take care of that. You can use != to negate, rather than halting.