Hi,
the evaluation brackets are used to "evaluate what is in between those brackets", before processing the code.
It is often used to evaluate dynamic variables. I hope you know what dynamic variables are.
They represent a range of variables who have the same characteristics.
Lets say for example u have a range of dynamic variables who all begin with %friend.
Example:
%friend.zyzzy yes
%friend.john yes
%friend.linda no
%friend.jack yes
So its always %friend.nickname value
Now suppose u have an on join event to determine if the person that joins is a friend or not.
on *:JOIN:#{ if (%friend.$nick == yes) msg # A friend of mine has joined the channel }
This is clearly wrong, because in this case mirc will try to see if there is a variable called %friend.$nick with a certain value.
That is wrong, because we don't have variables called %friend.$nick
We use actual names like john or linda.
In other words, we need to evaluate the identifier $nick first, to find out what the meaning is of $nick, and then look in our variables section if that nickname is a friend or not So thats where evaluation brackets come in:
--> if (%friend. [ $+ [ $nick ] ] == yes ) {
This will
first evaluate $nick , which could be "zyzzy", and then it will go and look in the variables section if "zyzzy" is a friend or not. Since %friend.zyzzy shows 'yes' it will match as a friend.
Note how we do not use [ [ $nick ] ], but use [ $+ [ $nick ] ]
The $+ identifier groups words together, otherwise we would end up with looking for
%friend. zyzzy , which is of course not what we want. We want
%friend.zyzzy Summary:
%friend.$nick --> nothing is evaluated, and mirc will look for a variable called %friend.$nick
%friend. [ $+ [ $nick] ] --> mirc first evaluates $nick which will return a name like zyzzy, then mirc will look at the variable %friend.zyzzy to determine wheter the value of that variable is yes or no.
Mirc also has another way of evaluating something, which is called $eval. You can find documentation about that by doing /help $eval in mirc, or using the "Search" function on this forum, or by asking someone to explain to u how $eval worx. I wont explain it right now as I think you should first try to grasp the idea of why and where evaluation is needed.
I hope this was somewhat helpful, and that you understand a bit better what evaluation brackets are for.
Greetz