mIRC Home    About    Download    Register    News    Help

Print Thread
/var -n evaluated #270300 24/05/22 12:00 PM
Joined: Dec 2021
Posts: 7
T
TrioAshburry Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Dec 2021
Posts: 7
I tried this in the aliases section:

Code
/t /var -gn %var $me | echo >> %var


And the result is that it evaluated the %var variable as my nickname.

Re: /var -n evaluated [Re: TrioAshburry] #270308 25/05/22 04:41 PM
Joined: Dec 2002
Posts: 5,135
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,135
Thanks for your bug report. The help file section describing /var -n is not very well worded :-]

The purpose of the -n switch is to prevent /set and /var from treating the value as a calculation. In other words, /set -n %var 5 + 2.

The /set -p switch does the same thing but also preserves "text" quotes, including empty "" quotes.

There are several ways to prevent a variable from being evaluated, eg. $evalvar(%var,0) or % $+ var, and so on.