wm-bot
wm-bot is an IRC bot that is being used in several Wikimedia IRC channels, particularly developer channels. This page documents the bot.
The bot is designed to have separate configuration for each channel, so that anyone can get it to their channel having own database.
Contents |
[edit] User access
[edit] Administrator
Administrator has access to all commands
[edit] Trusted
Trusted users have access to most of commands
If you are a trusted or admin you can use command @trustadd to insert more people to access list
[edit] Getting bot to the channel
In case you are a wikimedia user with wikimedia cloak and you want to use this bot in a wikimedia channel, you can just join #wm-botconnect, where you can type @add channel and it will join your channel and give you admin permissions for that channel.
[edit] Feed
[edit] @recentchanges-off
Needs admin rights
Disable a feed of recent changes
[edit] @recentchanges-on
Needs admin rights
Enable a feed of recent changes in current channel
[edit] @recentchanges+ wiki
Require admin rights
Insert a wiki to a feed (example fr_wikipedia) this is a global setting for all channels. It is necessary to insert a wiki before you can start using feed for that project. The bot is only watching projects for which the feed was requested.
[edit] @recentchanges- wiki
Require admin rights
Remove a wiki from a feed. Before you do this, consider if no one is currently watching the feed. This command should be used only for closed projects.
[edit] @RC-
Require trusted rights
Remove a page from a list of recent changes, affects only current channel.
[edit] @RC+ wiki page
Needs trusted rights
insert a page to a feed, example @RC+ de_wikipedia User:Test would make it report changes to de.wikipedia.org/wiki/User:Test directly to channel
[edit] Infobot
Infobot can be controlled by trusted users using following commands:
<@petan> !key is some data <wm-bot> Key was added! <@petan> !key <wm-bot> some data <@petan> !key del <wm-bot> Deleted key
You can create an alias by typing !key alias key2 so that !key would display value of key2.
[edit] @regsearch <regex>
Search regular expression in all values
[edit] @search <word>
Search key names and values for given word
[edit] Various commands
[edit] @logon
Require admin right
Start to generate public logs for current channel
[edit] @logoff
Require admin rights
Disable logs
[edit] @infobot-on
Require admin rights
Turn on infobot for current channel
[edit] @infobot-off
Require admin rights
Disable infobot on current channel
[edit] @part
Require admin rights
Part current channel preserving the configuration and database
[edit] @drop
Require admin rights
Leave channel and remove the configuration, logs and data base. The data can't be recovered once removed, so please don't use this command in case you want to keep logs.
[edit] @reload
Require admin rights
Reload configuration of the channel
[edit] @whoami
:)
[edit] User list
User list can be controlled using following commands
[edit] @trusted
Display list of users for current channel
[edit] @trustadd regex level
Add regex to defined level, example
@trustadd .*@wikipedia/John trusted
[edit] @trustdel regex
Delete regex, you can only delete trusted users
[edit] Files
Data: http://bots.wmflabs.org/~wm-bot/db - database of infobot
Logs: http://bots.wmflabs.org/~wm-bot/logs
[edit] Installation
[edit] Source
Source code is in wikimedia svn in /trunk, type
svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/tools/wmib
to download it
[edit] Compiling
In order to compile bot you need visual studio or mono develop, just open project file and hit make.
[edit] Settings
Main configuration file of a bot is wmib in this file you need to specify following variables:
- username - nick of bot and also for service acc
- password - for nickserv
- network
- nick
- channels
All values need to look like:
username=test;
there is no need to create any other files bot will create all databases itself