If there is any possibility of it incorrectly working when not including == $null or != $null, then you should include them.

if (!$2) {} will trigger on 0, $false, $null. if ($2) {} will trigger on everything except 0, $false, $null. It's important to let someone learning to script know that before suggesting that they use it. And, in his case, this could be a problem. It's quite possible to tell the bot to join channel "0". It may be unlikely, but it is possible, so it's a good idea to stick to using $null because there is a possibility.

When you're 100% certain that you will not trigger it incorrectly (or not trigger it when you should) by dropping the $null part, then you can drop it. If you aren't sure, then always use == $null or != $null.

It will also fail to work properly for him if the channel is "1".

Last edited by Riamus2; 25/09/07 08:27 PM.

Invision Support
#Invision on irc.irchighway.net