SWMTBot

Being migrated to countervandalism/CVNBot@github

Commands
All global lists are automatically synchronized across all SWMTBots; per-wiki lists are not. There is a global article watchlist for all wikis, and one for each one; you can add/delete/show items on the global list by leaving out the "p=" parameter (see the command lists below for more information).
 * regex : If you do not know what regex means, don't use commands that have this keyword in their instructions. It could potentially cause of a lot of problems in the network by using it wrong, because commands that use regex can sometimes trigger an automatic greylist causing false positives to be made and thus (for example) an edit of an interwiki bot could be matched and then flooding channels.

Configuration
SWMTBot-sample.ini


 * : Nickname the bot will use when joining  on  . Also used to identify with NickServ (so it should be a nickname registered with NickServ, but it doesn't have to be the name of the NickServ account, it could be one of the grouped aliases).
 * : Password for the NickServ account.
 * : User comment as returned by /whois. The software version number is appended to this, so the usual value for this is something like or ending with "SWMTBot Version: "
 * : Comment used when the bot parts. It is recommended to mention a URL here to a page with more information about this bot in particular or the group it is run by (e.g. " https://meta.wikimedia.org/wiki/SWMTBot ", " https://meta.wikimedia.org/wiki/CVN " or " https://wiki.example.org/wiki/Project:Countervandalism#Bots ")
 * : Hostname of the IRC server where  is hosted.
 * : A channel on . The bot joins this channel but doesn't report anything to it by default. It is used as a way for global operators to command a bot without having to know or find the   the bot it is. Make sure that this channel is secured as voice or op access here would give the user the ability to send local or global commands to any bot in this channel, even if the user is not in the.
 * : A channel on . The bot joins this channel and sends it's primary output reporting edits from the RCReader here.
 * : Relative path to Console.msgs, usually " ".
 * : Relative path to Lists.sqlite (file is created if it doesn't exist), usually " ".
 * : Relative path to Projects.xml (file is created if it doesn't exist), usually " ".
 * : A channel on . Most installations can leave this at the magic value   which will make the bot not join anything for this. Larger installations can use this channel to synchronize the items in the database marked "global". The bot will send broadcast messages to this channel when it executes something in it's database that is "global". And it also reads broadcast messages from the broadcast channel by other bots and processes them, applying the same command to it's own database. The broadcastchannel should be very well restricted as bots read anything from this channel as a potential broadcast message (regardless of voice or op). This was done so that no accesslists have to be maintained (For example the channel could be made invite only and moderated. That way you can invite a bot to the channel to let it replicate the global database. And only give it voice when it may also send commands back to the swarm).
 * : Threshold used to determine whether an edit is to be considered a "Large removal". An edit removing more than this number of bytes will be highlighted in the feed channel. Value should be below 0. Default is " ".
 * : Threshold used to determine whether an edit is to be considered a "Large edit". An edit adding more than this number of bytes will be highlighted in the feed channel. Value should be above 0. Default is " ".
 * : Threshold used to determine whether an edit is to be considered a "Large create". A page creation with more than this number of bytes will be highlighted in the feed channel. Value should be above 0. Default is " ".
 * : Threshold used to determine whether an edit is to be considered a "Tiny create". A page creation with less than this number of bytes will be highlighted in the feed channel. Value should be above 0. Default is " ".
 * : Shell command to execute when the control command "restart" is given by an op in IRC. Usually this is "nice" (with "mono SWMTBot.exe" in ), or "mono" (with "SWMTBot.exe" in  ).
 * : Shell arguments to.

Feed filters
These settings allow filtering of user types and event types. They are defined via the  file.

Valid values

 * 1 ("show"): Shows all items and allows autolisting of the item. This is the default value unless otherwise noted below
 * 2 ("softhide"): Hides items not notable for any reason. Does let exceptions got through and alloes items to be autolisted. softhide users: Only show large actions or actions matching watchlist/BES/BNU etc. softhide events: Hide actions performed by bots, admins or whitelisted users.
 * 3 ("hardhide"): Hides all items. Does allow autolisting of the item.
 * 4 ("ignore"): Hides all items and item is not let into the regular flow at all (early skip)


 * show/ignore is dealt with at beginning of ReactToRCEvent
 * hardhide is dealt with at end of ReactToRCEvent (after autolistings are done)
 * softhide is done inline

Filters

 * : Actions by logged-out users (IP users, Anonymous users)
 * : Actions by logged-in users (registered users)
 * : Actions by bot users. If the username is on the CVN "bot list", then all actions by the user are handled by this feed filter. If the user is not on the CVN "bot list", then only edits with the MediaWiki "botflag" on the edit itself ( b ) are handled by this feed filter.
 * : Edits with the MediaWiki "minorflag" on the edit itself ( m ).
 * : Any edit that changes an existing page.
 * : Any edit that created a new page.
 * : Log action 'move'.
 * : Log action 'block' or 'unblock'.
 * : Log action 'delete'.
 * : Log action 'newuser', 'newuser2' or 'autocreate'.
 * : Log action 'upload'
 * : Log action 'protect', 'unprotect' or 'modifyprotect'.
 * ,  and   permissions apply ("voiced" users in the channel can give list commands, "op" can give control commands, and it answers in the channel where the command was given).

Restart
and  are technically optional. But they must be used in pair. If one is defined, the other must be as well. Executed like this in C#: Default if  is not defined:

Either way, after this command is executed, the Program calls "Exit".