|This page is obsolete. It is kept for historical interest only. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. -- See wm-bot for successor|
- 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
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.
- wm-bot (successor)