use the code he gave u ... but make sure u use a space like this
if ($nick == NICK ) haltdef

thats why its not working like u hoped because ur not typing it out right