== Commands ==
### Raw ###
Requires: Developer.
```
=raw <CMD>
```
Sends a raw IRC command to the server
### Config ###
Requires: Developer.
```
=config <subcommand>
```
```
<subcommand> := <configcommand>|<setcommand>|save|rehash
<configcommand> := get|del <configoption>
<setcommand := set <configoption> <newvalue>
```
Sets a configuration option
### Quit ###
Requires: Superuser.
```
=quit
```
Stops the bot.
### Stalk ###
Requires: Advanced.
```
=stalk <addcmd>|<delcmd>|<setcmd>|list|<convertcmd>|<mailcmd>|<descriptioncmd>|<expirycmd>|<enabledcmd>
```
```
<addcmd> := add <flag>
<delcmd> := del <flag>
<setcmd> := set <flag> <simplevalue>|<complexvalue>
<convertcmd> := convert <flag>
<mailcmd> := mail <flag> [immediate] true|false
<descriptioncmd> := description <flag> <description>
<expirycmd> := expiry <flag> <expiry date>
<enabledcmd> := enabled <flag> true|false
<simplevalue> := page|user|summary <regex>
<complexvalue> := xml <xml fragment>
```
Modifies stalk commands
Use "add <flag> simple" to add a new simple stalk flag, then "set <flag> user|page|summary <regex>" to set up the monitoring for that stalk.
Use "add <flag> complex" to add a new complex stalk, then "set xml <xmlfragment>" to set the search tree for the complex stalk.
A complex stalk XML search tree is an XML root element from the list: and, or, not, true, false, user, page, summary. and and or MUST have two child nodes, not MUST have one child node, and the rest MUST have zero child nodes. user, page, and summary MUST have an attribute called value containing a regular expression to match.
For example:
```
<and>
<or>
<page value="Wikipedia:New contributors' help page"/>
<page value="Wikipedia:Help Desk"/>
</or>
<and>
<not>
<user value="Stwalkerster"/>
</not>
<summary value="/\* New Section \*/"/>
</and>
</and>
```
Use the convert option to convert a simple stalk into a complex stalk.
Use the mail option to enable or disable logging of stalk triggers via email. By default, every stalk has it enabled.
### ACC ###
Requires:
```
=acc <id> <username>
```
Adds a stalk with key `acc<id>` (eg `acc12345`) for any match on the specified username
### Access ###
Requires: Superuser.
```
=access list|<addcmd>|<delcmd>
```
```
<addcmd> := add <hostmask> Developer|Superuser|Advanced|Normal|Semiignored|Ignored
<delcmd> := del <hostmask>
```
Modifies the access list
### Mail ###
Requires: Developer
```
=mail
```
Sends the stalk log to stwalkerster@helpmebot.org.uk, then clears the stalk log.
### Clear ###
Requires: Developer
```
=clear
```
Clears the stalk log.
### Version ###
Requires: Developer.
```
=version
```
Shows the current bot version.
## Future commands ##
(none planned)
## Edit Flags ##
For the flag-based stalks, this is a description of some of the flags:
```
! - unreviewed
M - minor
N - new
B - bot
move - move
```