I've tried to make the syntax flexible for AutoTroll. Below are the rules I've devised with the help from people on the at.userlist
General Rules
1. All variables must begin with a '$'.
2. The value of the variable must be separated from the variable name with a ":"
3. Where the variable is in the message body does not matter (beginning of line or middle), but only one variable can be processed per line because of #5 in the formatting rules below.
Formatting rules for variable : value pair are as follows:
1. Leading characters up to '$' are ignored
2. Words / letters attached to '$' is processed as Variable
3. Trailing characters after a space and before ":" are ignored
4. Spaces after ":" are ignored
5. Upon getting to the first character, the rest of line read in as the value for the variable
Example1 This is to set your name $PlayerName (spaces allowed) : a Red Troll
result:
Player's name set to 'a Red Troll'
Example2 $ PlayerName : Red Troll
result:
Error - unrecognized variable '' See Debugging templates for when players will get an error message.
Example3 $BroadCastMsgs : yeS recieve, no=don't receive. When you send
result:
BroadCastMessages config set to YES
Example4 $EMail: red.troll@sharenet.com
$PlayerAlias: Red Troll
result:
The player's alias is set to 'Red Troll' and the e-mail address is changed to red.troll@sharenet.com
Confirmation
When a message is received any changes in the configuration will be made in the log file. Also, the player will be sent the PLAYER-Config.atf file.