Version 4 vs 5
Version 4 vs 5
Edits
Edits
- Edit by stwalkerster, Version 5
- Apr 23 2018 7:51 PM
- ·Update for 2.2
- Edit by stwalkerster, Version 4
- Mar 17 2018 2:19 PM
« Previous Change | Next Change » |
Edit Older Version 4... | Edit Older Version 5... |
Content Changes
Content Changes
== Installation ==
1. Download the latest binaries from the project page: #eyeinthesky
1. Extract the archive to an empty folder
1. Configure the bot by editing configuration.xml
1. (optional) [[ https://logging.apache.org/log4net/release/manual/configuration.html | Configure logging ]] by editing the file log4net.xml
1. Launch EyeInTheSky.exe
== Configuration ==
For the most part, the comments within configuration.xml should be self-explanatory, because I'm lazy and I don't want to have to update this page very often.
The key parts you need to know -
* Four general things to configure - the bot itself, the listening IRC network, the reporting IRC network, and the email server.
* Bot
* Channels to join on each network
* A prefix to all commands - commonly `!` but I use `=`, as does this documentation.
* A path to the configuration file for the stalks - this doesn't need to exist as it is managed by the bot.
* The full mask of the RC user to listen to
* The owner of the bot (full mask needed)
* The [[ https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings | format for displaying dates ]]
* Templates for IRC and email messages (advanced users only)
* Monitoring port (TCP, reports status of IRC connections)
* IRC networks (two of these)
* Most of this should be self-explanatory.
* Notably, `clientName` is just a name for logging and reporting.
* `username` is used both as the ident field, and the NickServ username if `authToServices` is set.
* `password` is the NickServ password, not the server password.
* Email
* `#{name}` style values [[ https://github.com/castleproject/Windsor/blob/master/docs/xml-configuration-properties.md | reference properties ]] from the top section
* The location of the configuration.xml file can be changed, pass the new location as the first command line parameter. This helps with upgrades, as your config can be held outside the application directory at a location of your choosing. As the stalk config location is also specified in the configuration file, this is able to be moved outside the application directory.
== Commands ==
The latest help for all commands can be found using the `=help` command.
### Help ###
Requires: Standard
```
=help
```
```
=help <Command>
```
Returns all available help for the specified command.
```
=help <Command> <Subcommand>
```
Returns the help for the specified subcommand.
Location: `Stwalkerster.Bot.CommandLib.Commands`
### Die ###
Requires: Owner
```
=die
```
Shuts down the bot.
Location: `Stwalkerster.Bot.CommandLib.Commands.BotManagement`
### Command Access ###
Requires: Standard
```
=commandaccess <command>
```
Retrieves the flag required to use the specified command.
Location: `Stwalkerster.Bot.CommandLib.Commands.AccessControl`
### My Flags ###
Requires: Standard
```
=myflags
=myaccess
=whoami
```
Retrieves the flags available to the current user.
Location: `Stwalkerster.Bot.CommandLib.Commands.AccessControl`
### Quick ###
Requires: Protected
```
=quick <Flag> <Type> <Match>
```
Sets up a new basic stalk with the specified match and type, and default options specified.
Specifically, `=quick foo page bar` would create a new stalk `foo` monitoring the page `bar`.
Location: `EyeInTheSky.Commands`
### Stalk ###
Requires: Protected
```
=stalk list
```
Lists all configured stalks
```
=stalk add <Flag>
```
Adds a new unconfigured stalk
```
=stalk del <Flag>
```
Deletes a stalk
```
=stalk enabled <Flag> <true|false>
```
Marks a stalk as enabled or disabled
```
=stalk mail <Flag> <true|false>
```
Enables or disables email notifications for each trigger of the specified stalk
```
=stalk description <Flag> <Description...>
```
Sets the description of the specified stalk
```
=stalk expiry <Flag> <Description...>
```
Sets the description of the specified stalk
```
=stalk set <Flag> <user|page|summary|xml> <Match...>
```
Sets the stalk configuration of the specified stalk to specified user, page, or edit summary regex. Alternatively, manually specify an XML tree (advanced).
```
=stalk and <Flag> <user|page|summary|xml> <Match...>
```
Sets the stalk configuration of the specified stalk to the logical AND of the current configuration, and a specified user, page, or edit summary regex; or XML tree (advanced).
```
=stalk or <Flag> <user|page|summary|xml> <Match...>
```
Sets the stalk configuration of the specified stalk to the logical OR of the current configuration, and a specified user, page, or edit summary regex; or XML tree (advanced).
An XML search tree is an XML root element from the list: `and`, `or`, `not`, `true`, `false`, `user`, `page`, `summary`, `flag`. `and` and `or` MUST have two child nodes, `not` MUST have one child node, and the rest MUST have zero child nodes. `user`, `page`, `flag` 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 mail option to enable or disable logging of stalk triggers via email. By default, every stalk has it enabled.
### ACC ###
Requires: Protected
```
=acc <id> <username>
```
Adds a new temporary stalk with key `acc<id>` (eg `acc12345`) for any match on the specified username
Location: `EyeInTheSky.Commands`
### Version ###
Requires: Standard
```
=version
```
Shows the current bot version.
Location: `EyeInTheSky.Commands`
## 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
```
== Installation ==
1. Download the latest binaries from the project page: #eyeinthesky
1. Extract the archive to an empty folder
1. Configure the bot by editing configuration.xml
1. (optional) [[ https://logging.apache.org/log4net/release/manual/configuration.html | Configure logging ]] by editing the file log4net.xml
1. Launch EyeInTheSky.exe
== Configuration ==
For the most part, the comments within configuration.xml should be self-explanatory, because I'm lazy and I don't want to have to update this page very often.
The key parts you need to know -
* Four general things to configure - the bot itself, the listening IRC network, the reporting IRC network, and the email server.
* Bot
* Channels to join on each network
* A prefix to all commands - commonly `!` but I use `=`, as does this documentation.
* A path to the configuration file for the stalks - this doesn't need to exist as it is managed by the bot.
* A path to the configuration file for the stalk templates - this doesn't need to exist as it is managed by the bot.
* The full mask of the RC user to listen to
* The owner of the bot (full mask needed)
* The [[ https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings | format for displaying dates ]]
* The MediaWiki (aka Wikipedia) API endpoint to use. The default is then English Wikipedia.
* The user agent string to use when talking to web services. It's very good practice to put your contact details here
* IRC networks (two of these)
* Most of this should be self-explanatory.
* Notably, `clientName` is just a name for logging and reporting.
* `username` is used both as the ident field, and the NickServ username if `authToServices` is set.
* `password` is the NickServ password, not the server password.
* Email
* `#{name}` style values [[ https://github.com/castleproject/Windsor/blob/master/docs/xml-configuration-properties.md | reference properties ]] from the top section
* The location of the configuration.xml file can be changed, pass the new location as the first command line parameter. This helps with upgrades, as your config can be held outside the application directory at a location of your choosing. As the stalk and template config locations are also specified in the configuration file, these are able to be moved outside the application directory.
== Commands ==
The latest help for all commands can be found using the `=help` command.
### Help ###
Requires: Standard
```
=help
```
```
=help <Command>
```
Returns all available help for the specified command.
```
=help <Command> <Subcommand>
```
Returns the help for the specified subcommand.
Location: `Stwalkerster.Bot.CommandLib.Commands`
### Die ###
Requires: Owner
```
=die
```
Shuts down the bot.
Location: `Stwalkerster.Bot.CommandLib.Commands.BotManagement`
### Command Access ###
Requires: Standard
```
=commandaccess <command>
```
Retrieves the flag required to use the specified command.
Location: `Stwalkerster.Bot.CommandLib.Commands.AccessControl`
### My Flags ###
Requires: Standard
```
=myflags
=myaccess
=whoami
```
Retrieves the flags available to the current user.
Location: `Stwalkerster.Bot.CommandLib.Commands.AccessControl`
### Stalk ###
Requires: Protected
```
=stalk list
```
Lists all configured stalks
```
=stalk report
```
Sends an email listing the configured stalks
```
=stalk add <Flag>
```
Adds a new unconfigured stalk
```
=stalk del <Flag>
```
Deletes a stalk
```
=stalk enabled <Flag> <true|false>
```
Marks a stalk as enabled or disabled
```
=stalk mail <Flag> <true|false>
```
Enables or disables email notifications for each trigger of the specified stalk
```
=stalk description <Flag> <Description...>
```
Sets the description of the specified stalk
```
=stalk expiry <Flag> <Description...>
```
Sets the description of the specified stalk
```
=stalk set <Flag> <user|page|summary|xml> <Match...>
```
Sets the stalk configuration of the specified stalk to specified user, page, or edit summary regex. Alternatively, manually specify an XML tree (advanced).
```
=stalk and <Flag> <user|page|summary|xml> <Match...>
```
Sets the stalk configuration of the specified stalk to the logical AND of the current configuration, and a specified user, page, or edit summary regex; or XML tree (advanced).
```
=stalk or <Flag> <user|page|summary|xml> <Match...>
```
Sets the stalk configuration of the specified stalk to the logical OR of the current configuration, and a specified user, page, or edit summary regex; or XML tree (advanced).
An XML search tree is an XML root element from the list: `and`, `or`, `not`, `xor`, `true`, `false`, `user`, `page`, `summary`, `flag`, `incategory`, `log`, `usergroup`, `x-of`.
`xor` MUST have two child nodes, `not` MUST have one child node, `and`, `or`, and `x-of` can have any number of child nodes, and the rest MUST have zero child nodes.
`user`, `page`, `flag`, `log` and `summary` MUST have an attribute called value containing a regular expression to match.
`incategory`, and `usergroup` MUST have an attribute called value containing an exact string to match.
For example:
```
<and>
<or>
<page value="Wikipedia:New contributors' help page"/>
<page value="Wikipedia:Help Desk"/>
</or>
<not>
<user value="Stwalkerster"/>
</not>
<summary value="/\* New Section \*/"/>
</and>
```
Use the mail option to enable or disable logging of stalk triggers via email. By default, every stalk has it enabled.
### Version ###
Requires: Standard
```
=version
```
Shows the current bot version.
Location: `EyeInTheSky.Commands`
## 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
```
### Templates ###
Templates can be defined in the template configuration file.
In version 2.2, the "acc" and "quick" commands were removed, due to the expectation that these would be replaced by templates. The relevant configuration for these is listed below:
``` lang=xml
<template flag="acc" description="ACC {0}: {1}" stalkflag="acc{0}" immediatemail="true"
stalkenabled="true" templateenabled="true" expiryduration="P90D">
<searchtree>
<![CDATA[<or><user value="{1:R}" /><page value="{1:R}" /><summary value="{1:R}" /></or>]]>
</searchtree>
</template>
<template flag="quick" immediatemail="true" stalkenabled="true" templateenabled="true"
expiryduration="P90D">
<searchtree><![CDATA[<{0} value="{1:R}" />]]></searchtree>
</template>
```
The attributes available are:
* `flag` - the identification tag for this template. Also acts as the command name for instantiating an instance of this template.
* `description` - the default description for an instance of this template. Accepts parameters in the form `{0}`, `{1}`, etc.
* `stalkflag` - if set, a default pattern for the flag of the stalk. Accepts parameters in the form `{0}`, `{1}`, etc.
* `immediatemail` - the default value for the `immediatemail` attribute on the stalk.
* `stalkenabled` - the default value for the `enabled` attribute on the stalk.
* `templateenabled` - whether or not to register this template as a command to allow instantiation
* `expiryduration` - a time duration in [[https://en.wikipedia.org/wiki/ISO_8601#Durations|ISO 8601]] format.
Within the template should be a string representing the XML search tree of the stalk. Accepts parameters in the form `{0}`, `{1}`, etc. Beware of regular expressions - use the format `{0}`, `{1}`, etc to escape the content of the parameter into a form which will match a regular expression.
== Installation ==
1. Download the latest binaries from the project page: #eyeinthesky
1. Extract the archive to an empty folder
1. Configure the bot by editing configuration.xml
1. (optional) [[ https://logging.apache.org/log4net/release/manual/configuration.html | Configure logging ]] by editing the file log4net.xml
1. Launch EyeInTheSky.exe
== Configuration ==
For the most part, the comments within configuration.xml should be self-explanatory, because I'm lazy and I don't want to have to update this page very often.
The key parts you need to know -
* Four general things to configure - the bot itself, the listening IRC network, the reporting IRC network, and the email server.
* Bot
* Channels to join on each network
* A prefix to all commands - commonly `!` but I use `=`, as does this documentation.
* A path to the configuration file for the stalks - this doesn't need to exist as it is managed by the bot.
* A path to the configuration file for the stalk templates - this doesn't need to exist as it is managed by the bot.
* The full mask of the RC user to listen to
* The owner of the bot (full mask needed)
* The [[ https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings | format for displaying dates ]]
* Templates for IRC and email messages (advanced users only)* The MediaWiki (aka Wikipedia) API endpoint to use. The default is then English Wikipedia.
* Monitor* The user agent string to use when talking port (TCP,to web services. reports status of IRCIt's very good practice to put your connections)tact details here
* IRC networks (two of these)
* Most of this should be self-explanatory.
* Notably, `clientName` is just a name for logging and reporting.
* `username` is used both as the ident field, and the NickServ username if `authToServices` is set.
* `password` is the NickServ password, not the server password.
* Email
* `#{name}` style values [[ https://github.com/castleproject/Windsor/blob/master/docs/xml-configuration-properties.md | reference properties ]] from the top section
* The location of the configuration.xml file can be changed, pass the new location as the first command line parameter. This helps with upgrades, as your config can be held outside the application directory at a location of your choosing. As the stalk and template config location iss are also specified in the configuration file, this isthese are able to be moved outside the application directory.
== Commands ==
The latest help for all commands can be found using the `=help` command.
### Help ###
Requires: Standard
```
=help
```
```
=help <Command>
```
Returns all available help for the specified command.
```
=help <Command> <Subcommand>
```
Returns the help for the specified subcommand.
Location: `Stwalkerster.Bot.CommandLib.Commands`
### Die ###
Requires: Owner
```
=die
```
Shuts down the bot.
Location: `Stwalkerster.Bot.CommandLib.Commands.BotManagement`
### Command Access ###
Requires: Standard
```
=commandaccess <command>
```
Retrieves the flag required to use the specified command.
Location: `Stwalkerster.Bot.CommandLib.Commands.AccessControl`
### My Flags ###
Requires: Standard
```
=myflags
=myaccess
=whoami
```
Retrieves the flags available to the current user.
Location: `Stwalkerster.Bot.CommandLib.Commands.AccessControl`
### QuicStalk ###
Requires: Protected
```
=quick <Flag> <Type> <Match>=stalk list
```
Sets up a new basic stalk with the specified match and type, and default options specified.
Specifically, `=quick foo page bar` would create a new stalk `foo` monitoring the page `bar`.
Location: `EyeInTheSky.Commands`
### Stalk ###
Requires: ProtectedLists all configured stalks
```
=stalk listreport
```
Lists allSends an email listing the configured stalks
```
=stalk add <Flag>
```
Adds a new unconfigured stalk
```
=stalk del <Flag>
```
Deletes a stalk
```
=stalk enabled <Flag> <true|false>
```
Marks a stalk as enabled or disabled
```
=stalk mail <Flag> <true|false>
```
Enables or disables email notifications for each trigger of the specified stalk
```
=stalk description <Flag> <Description...>
```
Sets the description of the specified stalk
```
=stalk expiry <Flag> <Description...>
```
Sets the description of the specified stalk
```
=stalk set <Flag> <user|page|summary|xml> <Match...>
```
Sets the stalk configuration of the specified stalk to specified user, page, or edit summary regex. Alternatively, manually specify an XML tree (advanced).
```
=stalk and <Flag> <user|page|summary|xml> <Match...>
```
Sets the stalk configuration of the specified stalk to the logical AND of the current configuration, and a specified user, page, or edit summary regex; or XML tree (advanced).
```
=stalk or <Flag> <user|page|summary|xml> <Match...>
```
Sets the stalk configuration of the specified stalk to the logical OR of the current configuration, and a specified user, page, or edit summary regex; or XML tree (advanced).
An XML search tree is an XML root element from the list: `and`, `or`, `not`, `xor`, `true`, `false`, `user`, `page`, `summary`, `flag`, `incategory`, `log`, `flag`.`usergroup`, `and` and `or``x-of`.
`xor` MUST have two child nodes, `not` MUST have one child node, `and`, `or`, and `x-of` can have any number of child nodes, and the rest MUST have zero child nodes.
`user`, `page`, `flag`, `log` and `summary` MUST have an attribute called value containing a regular expression to match.
`incategory`, `flag` and `summary`usergroup` MUST have an attribute called value containing a regular expressionan exact string 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 \*/"/>
</andsummary value="/\* New Section \*/"/>
</and>
```
Use the mail option to enable or disable logging of stalk triggers via email. By default, every stalk has it enabled.
### ACC ###
Requires: Protected
```
=acc <id> <username>
```
Adds a new temporary stalk with key `acc<id>` (eg `acc12345`) for any match on the specified username
Location: `EyeInTheSky.Commands`
### Version ###
Requires: Standard
```
=version
```
Shows the current bot version.
Location: `EyeInTheSky.Commands`
## 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
```
### Templates ###
Templates can be defined in the template configuration file.
In version 2.2, the "acc" and "quick" commands were removed, due to the expectation that these would be replaced by templates. The relevant configuration for these is listed below:
``` lang=xml
<template flag="acc" description="ACC {0}: {1}" stalkflag="acc{0}" immediatemail="true"
stalkenabled="true" templateenabled="true" expiryduration="P90D">
<searchtree>
<![CDATA[<or><user value="{1:R}" /><page value="{1:R}" /><summary value="{1:R}" /></or>]]>
</searchtree>
</template>
<template flag="quick" immediatemail="true" stalkenabled="true" templateenabled="true"
expiryduration="P90D">
<searchtree><![CDATA[<{0} value="{1:R}" />]]></searchtree>
</template>
```
The attributes available are:
* `flag` - the identification tag for this template. Also acts as the command name for instantiating an instance of this template.
* `description` - the default description for an instance of this template. Accepts parameters in the form `{0}`, `{1}`, etc.
* `stalkflag` - if set, a default pattern for the flag of the stalk. Accepts parameters in the form `{0}`, `{1}`, etc.
* `immediatemail` - the default value for the `immediatemail` attribute on the stalk.
* `stalkenabled` - the default value for the `enabled` attribute on the stalk.
* `templateenabled` - whether or not to register this template as a command to allow instantiation
* `expiryduration` - a time duration in [[https://en.wikipedia.org/wiki/ISO_8601#Durations|ISO 8601]] format.
Within the template should be a string representing the XML search tree of the stalk. Accepts parameters in the form `{0}`, `{1}`, etc. Beware of regular expressions - use the format `{0}`, `{1}`, etc to escape the content of the parameter into a form which will match a regular expression.