Jump to: navigation, search

mwbot was an IRC bot written by amidaniel to help on the #mediawiki support channel on the freenode IRC network. It also has its own channel, #mwbot.

The (more or less) current list of factoids can be viewed on the toolserver - see the @dump command below. mwbot-generated logs can be found here.

Quick help[edit | edit source]

displays factoid foo
!foo | quux
displays factoid foo, addressing the response to user quux
!foo is bar
defines factoid foo to be bar
!foo alias bar
defines foo as an alias for the factoid bar
!foo del
deletes factoid foo
@search foo.*
searches for the regular expression foo.* in all factoids
@trust host
trusts users on host, especially useful with IRC cloaks; host may be a regular expression
@untrust host
removes trust for users on host; must match an entry made with trust exactly
lists trusted hosts
Dumps out the contents of mwbot's brain to an html file for browsing, see botbrain.

Parameters in factoids[edit | edit source]

Factoids can accept up to nine parameters, passed as space-delimited "arguments" to the factoid.

!foo is Hello, `1!
When expanded using "!foo bar", this will produce "Hello, bar!".
!foo is Hello, `e1!
URL-encodes the first parameter it receives. When expanded using "Hello, $wgGroupPermissions!", it produces "Hello, %24wgGroupPermissions!". Note that the parameters are encoded as UTF-8 which quite likely won't work for a lot of folks over IRC (may need to be changed).

Factoids can also contain other factoids "subst'ed" within them, using the following syntax:

!foo is Bar says `!bar``.

Any parameters of the form "`1" are expanded before internal factoids are expanded. Internal factoids can also accept parameters, for instance:

!foo is When you call bar with `1, you get `!bar `1``.

Sort of disgusting syntax, but it was easy to implement and hopefully not too confusing for the user :) See "!man" and "!info" for more realistic examples of how parameters are used.

See also[edit | edit source]