 EternalChat script file
 ===========================================================================================

 All lines not starting with & are ignored, and can be used as comments.

 Lines that start with & are filters for data from Battle.net.  Format:
 &<event number>&<usermask>&<flags match>&<conditional>&<text match>&<action>

 <event number> is the Battle.net event, minus 1000.
 Some valid event IDs are: 2 - trigered when someone joins the channel you're in.
                           3 - triggered when someone leaves the channel
                           4 - triggered when someone whispers you
                           5 - triggered when someone speaks in the channel
                           7 - triggered when you join a channel
                           23 - triggered when someone emotes

 <usermask> is the mask to use for matching for usernames.  This can be an exact match,
 or it can be a wildcard match.

 <flags match> is a match for specific flags that apply to a user, taken from the database.

 <conditional> is a match for conditionals not involving incoming text from Battle.net,
 such as the value of a variable.  This is not yet implemented

 <text match> is a match for the text field of an incoming event, if present.  Here, this
 matches for a substring of the incoming text.  To match for the start of an event, begin
 with a quotation mark.  To match for the end of an event, end with a quotation mark.  To
 match for exact text, enclose the entire match in quotation marks.

 <action> is the action taken if all the above conditions are met.  Special preset actions
 begin with a colon, so it's not recommended to make responses starting with one.

 Note that <text match>, <usermask>, <flags match>, and <conditional> default to values
 which will always hold true.  Thus you do not have to specify anything in these fields if
 you do not want to use them for a particular response.

 ===========================================================================================

 Preset commands can be accessed through the action field of an event.
 
 Preset commands:

 :reconnect - reconnects the bot.
 :reply - whispers the user who triggered an action.
 :reload - reloads the script.
 :quit - closes the bot.

 ===========================================================================================

 Variables can be used in any action field, and are replaced with certain values when the
 bot processes a command.

 Variables:

 %1 - Username field of event
 %2 - Text that triggered event
 %3 - Text in actual event
 %4 - Unique name of bot, as assigned by Battle.net
 %5 - Current server IP address
 %6 - Current channel name
 %7 - Bot's home channel
 %10 - Flags field of event
 %11 - Trigger's flags
 %12 - Trigger's ping
 %16 - Username of user which last whispered the bot
 %31 - Bot uptime (since bot connected - only accurate to 49.7 days)
 %32 - System uptime (only accurate to 49.7 days)
 ===========================================================================================

 These are some example scripts to get you started.
 ***Remove the space infront of the & to enable the script.***

 This will greet anyone who joins the channel whose name matches *[vL]*
 &2&*[vL]*&&&&Welcome to channel %6, %1!

 A more advanced command to report general information about the bot to people with the O
 flag when they whisper "status" or type ".status" in channel
 &4&&O&&"status"&:reply Bot server is %5, bot home channel is %7, bot uptime is %31.
 &5&&O&&".status"&:reply Bot server is %5, bot home channel is %7, bot uptime is %31.

 This will allow any user to get their ping and flags by typing "myinfo" in the same channel
 that the bot is in
 &5&&&&"myinfo"&:reply You have a ping time of %12ms and flags %11.

 Note that the text matches are surrounded in quotes. This means that the text to match has
 to be exatly the same as what is typed to trigger a response. With no quotes, then it will
 be triggered if it finds the text anywhere in the typed message. If there is a quote at the
 beginning of the text and not at the end, then that means it will match the beginning of a
 typed message. This also works visa-versa: if there is a quote at the end of the text and
 not at the beginning, then that means it will match the end of a typed message. Some
 examples of this are as follows.

 This will attempt to ban a user with reason "no anti-idles" if the end of their emote
 message is "anti-idle"
 &23&&&&anti-idle"&/ban %1 no anti-idles

 This will whisper someone if their typed chat message contains "hello bot"
 &5&&&&hello bot&:reply Hello. How are you?