I have a script that displays help to a remote user by playing a specific section of a text file. An example of a help request is:
!help security
...and the relevant snippet of the script file is:
if ($ulevel >= %level.operator) {
.play -cq9m3t $+ $2 $nick txt\operators.txt 1000
}
The section of the text file, operators.txt, looks like this:
[security]
//msg $nick %setcolor $+ %orange $+ %bold $+ .getpass %setcolor $+ %blue $+ <operator> $+ %bold $+ %setcolor $+ %brown Retrieves the Password for the operator you specify.
...where the variables %setcolor, %orange, %blue, and %brown are defined globally to produce the desired text highlighting.
I have two problems:
(1) the '-c' switch not only treats the lines read from the text file as commands to be interpreted by mIRC, it also echos them to the status window -- a considerable nuisance when there are several users requesting help text
(2) the interpreter somehow misses the '$nick' parameter in the text file (I imagine assigning it a $null value), treating the first token after it as a channel or nickname
Now, if I replace the $nick in the text file with an actual nickname, the script works exactly as desired.
Any suggestions/solutions?