I'm not very good at explaining stuff... but I'll try nonetheless.
When using the if/elseif conditionals,
The statement is checked by the script starting from the start of the line.
So if you have a line like;
if ($nick == Windlord) || ($chan == #windlord) && ($1 == !cmd)
The script will check if '$nick == Windlord' first.
Then it goes on to check the operator which is '||' in this case.
As '||' means; 'or' the script won't bother continuing to check the statement if the first conditional is already true.
By any chance, if '$nick != Windlord' the script will continue processing the statement.
If the operator is '&&' the script only continues checking if the first conditional is true. If it is false, there is no need to check the next conditional.
Now sometimes, we would want '!cmd' to work both for 'Windlord' and '#windlord' but since the script only processes the statements in the order they are written in, it is not possible to do so.
That's when you add in extra brackets so that the script can process additional conditionals included inside the main conditional.
If '!cmd' needs to be used by 'Windlord' as well as anyone on '#windlord, the script would need to be;
if (($nick == Windlord) || ($chan == #windlord)) && ($1 == !cmd)
And so on...
Hope this helps.