3 Heikki Hokkanen <hoxu@users.sf.net>
9 NOTE: At the time of this writing, Supybot version is 0.83.3. If you are using a newer (or even older) version, keep that in mind.
11 NOTE: This document is very much a work in process. It covers nowhere near everything there is to Supybot. However, it hopefully allows a good start into learning Supybot.
13 === What is this document? ===
15 This document is a handbook for http://supybot.com/[Supybot], the IRC (http://en.wikipedia.org/wiki/Internet_Relay_Chat[Internet Relay Chat]) bot written in Python.
17 === Motivation behind this document ===
19 Some time ago I started needing an IRC bot for various purposes. The bot would have to be able to take care of auto-opping and similar "traditional" channel duties. This made me think of http://oer.equnet.org/[Oer], an old but very nice bot. However, I also wanted to have factoid functionality similar to http://blootbot.sourceforge.net/[blootbot]/http://infobot.org/[infobot], without having to run multiple bots. That was when I arrived at Supybot once again. This time I decided to give it a closer look.
21 My experience of the documentation was lacking though. I longed for something similar to http://oer.equnet.org/um.php[Oer's User Manual] that provides a quick references for basic administrator tasks and so forth. Alas, I could not find such document.
23 I figured I could as well wrap up such a handbook while learning to use the bot myself. Hopefully someone finds reading this document as useful as writing it was.
25 === Conventions used in this document ===
27 `command <name> [value]`::
28 A command that takes `name` as a required parameter and `value` as an optional parameter.
31 A command that takes one or more parameters.
33 `command [\--{foo,bar}] <value>`::
34 A command that takes two optional options as parameters, eg. `\--foo value` and/or `\--bar value`.
39 === This document is Free ===
41 This document is Free (TM) as defined by the http://www.fsf.org/[Free Software Foundation], more specifically, this document is available under the terms of http://www.gnu.org/licenses/gpl-3.0.txt[GNU General Public License version 3 (GPLv3)]. The source is a text file that can be converted to various formats by http://www.methods.co.nz/asciidoc/[asciidoc].
43 === How to give feedback ===
45 If you spot an error, have suggestions or just want to tell me how much you love/hate the document, send e-mail to mailto:hoxu@users.sf.net[]. Prefix the Subject with `[supybook]`.
49 === Initial configuration ===
51 Create a new directory (eg. `mkdir ~/supybot`) and run `supybot-wizard` in it. Follow the directions to get the bot initially configured.
53 Once you are ready with the wizard, I suggest you start the bot inside screen:
60 This way you can attach to the screen later to see the messages it writes to stdout, while still running the bot in the background. Alternative is to run it in the daemon mode, `supybot \--daemon configFile`.
62 You can set up a crontab to start the bot automatically, for example:
65 > @reboot screen -d -m supybot /path/to/configFile
68 === Identifying to the bot ===
70 After running supybot-wizard and starting the bot, connect to the same IRC network it is on, and /query it. You can identify with the `identify <name> <password>` command. You can check the bot's idea of who you are with the `whoami` command.
72 === Accessing the online help ===
74 Most commands on the bot have a short online help available. You can use `list` to list loaded plugins, and `list <plugin>` to list commands in those plugins. `help [plugin] <command>` can be used to access the command help. Use `more` to read long messages from the bot.
76 Help for configuration items can be accessed with the `config help <key>` command.
78 == Understanding supybot's peculiarities ==
80 Supybot has a couple of features that sets it apart from more traditional bots. More specifically, nested commands, plugin framework (even the basic functionality is implemented using plugins), and capabilities. This section covers some basic information about Supybot. Feel free to skip it, but come back later if you run into something you don't understand.
82 === Nested commands ===
84 Supybot allows nested commands, in other words, you can pass the result of a command to another command as a parameter. What does this allow then, though, apart from the obvious bragging rights? For example, if you want to restore a configuration entry to the default value, you can type:
86 `config reply.withNickPrefix [config default reply.withNickPrefix]`
88 Obviously, that wasn't very neat. They could've included a `config reset <key>` command instead, for example. But I'm sure you can figure out *something* more useful to do with this, as a homework ;-)
92 Pretty much everything in Supybot is a plugin. Most commands you use belong to a plugin. If two plugins provide the same command, then you need to prefix the command with the plugin name. For example, the `ignore list` command yields the following output:
96 Error: The command "ignore list" is available in the Admin and Channel plugins.
97 Please specify the plugin whose command you wish to call by using its name as a command before "ignore list".
100 Thus, you need to either use `admin ignore list` or `channel ignore list` command. That is, unless you define which plugin is the default one using the `defaultplugin [\--remove] <command> [plugin]` command provided in the [green]#Owner# plugin.
102 The `list` command ([green]#Plugin#) can be used to list loaded plugins. You can prevent some plugins from showing in the list with the command:
104 `config plugins.<plugin>.public False`
106 WARNING: This does not really make the plugins private. They can still be listed by unregistered users (unless they have anticapability for `list`). This is a bug in my opinion.
109 List currently loaded plugins, excluding the ones set non-public.
112 List loaded plugins that are set to non-public.
115 List commands provided by the given plugin.
117 `load [\--deprecated] <plugin>`::
118 Load a plugin. Supybot looks for plugins in directories listed in `config conf.supybot.directories.plugins`.
121 Unloads a plugin. The [green]#Owner# plugin cannot be unloaded.
123 === Configuration ===
125 Most of Supybot configuration is done online using the [green]#Config# plugin. This excludes things such as granting the owner capability (must be done by modifying the files).
127 There are two types of configuration items: global and channel-specific. The latter are actually no different from the global ones, except that they can be set for channels as well. This means you can have a global default which is overridden for specific channels.
129 Configuration items are hierarchical. The "root" item is `supybot`, which can be omitted. Configs for plugins live under their own key, `supybot.plugins`, or shortly, `plugins`.
131 `config <name> [value]`::
132 Get the current value of `name`, or set it to `value` if provided.
134 `config channel [channel] <name> [value]`::
135 Ditto, but for channel configs.
137 `config default <name>`::
138 Get the default value of `name`. This does not change the value. No, there is no command to reset an item to default value. You need to use `config <name> [config default <name>]` for that.
140 `config export <filename>`::
141 Export non-confidential parts of configuration to a file for debugging purposes.
143 `config help <name>`::
144 Show help for a configuration item.
146 `config list <group>`::
147 List configuration items in `group`. Subgroups are prefixed with '@', channel-specific items with '#'.
150 Reloads configuration. Mostly useful if you've had to modify the files by hand.
152 `config search <word>`::
153 Show configuration items matching `word`.
158 Many traditional IRC bots manage permissions of users using flags. Some network services in fact, do, too. Each user can have various flags on each channel. The flags can mean auto-op, op, use of !ban command and so forth. On side of those, there are often global user flags that entitle the user to full access, global auto-op, etc. Some bots also support channel flags that determine what bot functionality is available on the channel.
160 Supybot does not have any flags. Instead, the permissions are managed using 'capabilities'. There are two kinds of capabilities: `user capabilities` and `channel capabilities`.
162 'User capabilities' are checked first when a user tries to run a command. If the user has an 'anticapability' for the command (eg. `-command`, `-Plugin.command`) or the Plugin (`-Plugin`), it won't be run.
164 Next, if the command was run on the channel, the 'channel capabilities' are checked. The logic is same as above, but the checked capabilities are prefixed with `#channel,`, for example `#channel,-Plugin.command`.
166 There are some special capabilities recognized by Supybot:
169 For bot owners: the people who have "physical" access to the bot and its files. This cannot be granted online; the 'conf/users.conf' file must be edited by hand followed by `reload`. Owners are exempt from `#channel,op` capability checks and channel anticapabilities.
172 For bot administrators. Users with this capability can manage global bot properties, make the bot join new channels and so forth. However, they can't do channel administration which is reserved for ops.
175 Channel ops can execute channel-related commands.
178 Allow user to run commands that can potentially crash the bot, or cause denial of service on the system it's running on.
180 Commands used to manipulate capabilities are covered in the <<channel-capabilities,Manipulating channel capabilities>> and <<user-capabilities,Manipulating user capabilities>> sections.
182 == Administrative tasks ==
186 Related plugins: [green]#Network, Services#.
188 ==== Adding a network ====
190 `network connect [--ssl] <network> [<host[:port]>] [password]`::
191 Connect to `network`. `host` must be provided if the network is new or has no servers defined.
193 ==== Reconnecting ====
195 `reconnect [network] [message]`::
196 Disconnects and connects `network`, or current if not specified. `message`, if given, is shown as the quit message, otherwise `config plugins.Owner.quitMsg` is used, or your nickname.
198 ==== Disconnecting ====
200 `network disconnect [network] [message]`::
201 Disconnect `network`, or current if not specified. `message` as above.
203 ==== Listing networks ====
206 List of networks & servers currently connected to.
210 freenode: wolfe.freenode.net and ircnet: irc.elisa.fi
213 `config list networks`::
216 ==== Adding more servers ====
218 Once you've added a network with the initial server, you can add more servers:
220 `config networks.<network>.servers [config networks.<network>.servers] server:6667`
222 ==== Listing network servers ====
224 `config networks.<network>.servers`
228 chat.freenode.net:6667
231 ==== Services: NickServ ====
233 WARNING: My pratical experience with [green]#Services# plugin on Freenode is... not-so-good. It definitely does not work all the time as expected.
235 You can make Supybot identify itself to the network NickServ after it has connected.
237 `config plugins.Services.noJoinsUntilIdentified True`::
238 Settings this is useful on Freenode and other networks who change the user mask after identifying to NickServ. In my experience this seems to be a tad buggy, so I don't recommend enabling it unless really needed.
240 `config plugins.Services.NickServ NickServ`::
241 Tell the bot what name NickServ can be found under.
243 `services password <nick> [password]`::
244 Can be used to set or remove NickServ password.
246 NOTE: Password removal did not work for me on Supybot 0.83.3
248 `services identify`::
249 Identifies the bot to NickServ with the current nick. You don't need to give this command after the bot has been set up; it will identify when connecting to the network automatically.
251 ==== Services: ChanServ ====
253 You can make Supybot request op after joining a channel on a network with ChanServ.
255 `config plugins.Services.ChanServ ChanServ`::
256 Tell the bot what name ChanServ can be found under.
258 `config plugins.Services.ChanServ.op <on|off>`::
259 Set the default for all channels. This will be used unless a channel-specific config overrides it.
261 `config channel [channel] plugins.services.ChanServ.op <on|off>`::
262 Set to request op on the given `channel`.
264 Voice and half-op (on networks supporting it) can be used similarly.
268 Related plugins: [green]#Channel#.
270 NOTE: Commands in this section (such as adding/removing channels) work in the current network, eg. the one you are messaging the bot in. The commands also accept a `[channel]` parameter which is needed only when the command is written in private.
272 NOTE: If you want to /msg the bot in one network, while having the command apply in another network, you can use the `network command <network> <command> [params]` command. The reply comes in the other network if you are there as well.
274 ==== Adding a new channel ====
276 A new channel is added by messaging the bot in the same network with `join <channel> [key]` command.
278 ==== Listing channels ====
282 NOTE: This only works in private, to prevent knowledge of top secret channels from falling into wrong hands.
284 You can list channels in another network with `config networks.<network>.channels`.
286 ==== Removing a channel ====
288 `part [channel] [reason]`
290 ==== Modifying channel config ====
292 `config channel [channel] <name> <value>`
294 ==== Setting the key ====
296 `channel key [channel] [key]` can be used to set or clear the channel key.
298 ==== Setting the limit ====
300 `channel limit [channel] [limit]` sets or clears the channel limit.
302 ==== Channel commands ====
304 Channel ops can use the following commands to control the channel via the bot, assuming it is opped.
306 `op [channel] [nick...]`::
307 Ops the given nicks (or you if none) on the channel.
309 `deop [channel] [nick...]`::
312 `voice [channel] [nick...]`::
313 Voices the given nicks (or you if none) on the channel.
315 `devoice [channel] [nick...]`::
318 `kban [channel] [\--{exact,nick,user,host}] <nick> [seconds] [reason]`::
319 Bans and kicks the given nick from the channel. If `seconds` is specified and is not 0, the ban will expire after that time.
321 `mode [channel] <mode> [params]`::
322 Set channel mode. This can be used to change any channel modes, making the commands below redundant aliases.
324 `moderate [channel]`::
325 Set +m. This is not enforced by the bot, so any channel op can remove it.
327 `unmoderate [channel]`::
330 `topic lock [channel]`::
331 Set +t. Not enforced, so any channel op can remove it.
333 `topic unlock [channel]`::
336 `alert [channel] <text>`::
337 Sends `text` to all users on the channel with op capability.
340 Make the bot part and join the channel. Mostly useful to test whether auto-ops from other bots/users work for the bot.
342 ==== Maintaining the ban list ====
344 `ban add [channel] <nick|hostmask> [expires]`::
345 Add ban for given nick or hostmask on the channel. If nick is given, the full hostmask is banned. `expires` when gives, expires the ban after so many seconds.
347 `ban list [channel]`::
348 List bans with their expire times.
350 `ban remove [channel] <hostmask>`::
351 Removes the ban on given `hostmask`.
353 NOTE: Users matching the ban list are not automatically kicked off the channel. See the `kban` command in the previous section to kick and ban a user.
355 ==== Maintaining the ignore list ====
357 `channel ignore add [channel] <nick|hostmask> [expires]`
359 `channel ignore list [channel]`
361 `channel ignore remove [channel] <hostmask>`
363 NOTE: There is also a global ignore list.
365 ==== Listing channel nicks ====
367 `channel nicks [channel]`
369 ==== Topic operations ====
371 Related plugins: [green]#Topic#.
373 Supybot allows elaborate manipulation of the channel topic.
375 http://supybot.com/documentation/plugins/topic
379 Logging of channels is provided by the [green]#ChannelLogger# plugin. Various channel-specific configuration items are provided, see `config list plugins.ChannelLogger`.
381 By default logs will go into logs/ChannelLogger/<network>/<channel>/<channel>.log and will be rotated when the default "%d-%a-%Y" (eg. 06-Sat-2008) timestamp rotates. See http://docs.python.org/lib/module-time.html[the python documentation for strftime] for the formatting characters.
383 NOTE: The logs of [green]#ChannelLogger# cannot be searched online. However, other plugins provide some searching functionality. See <<searching-history,Searching the history>>.
385 ==== Auto-ops & voices ====
387 Auto-opping is provided by the [green]#AutoMode# plugin.
391 The [green]#Seen# plugin keeps track of last channel/nick/user activity. Most typical use is asking the bot when a given user was last seen chatting on a channel.
393 `seen any [channel] [\--user <user>] [nick]`::
394 Lists any activity given `nick` or `user` was doing on the channel. If no `nick` or `user` is given, returns the last activity on the channel, regardless of who it was from.
396 `seen last [channel]`:
397 Last line said on the channel.
399 `seen [channel] <nick>`::
400 Last time a `nick` was seen on a channel and what it said.
402 `seen user [channel] <user>`:
403 Ditto, except use a user name, disregarding what nick the said user had.
405 [[channel-capabilities]]
406 ==== Manipulating channel capabilities ====
408 `capability list [channel]`::
409 List capabilities on `channel`.
411 `capability set [channel] <capability..>`::
412 Adds the given `capability` to `channel`.
414 `capability unset [channel] <capability..>`::
415 Removes the given `capability` from `channel`.
417 `capability setdefault [channel] <True|False>`::
418 Whether to allow users on `channel` by default to access non-maintenance related commands. Default is True.
420 Note that this concerns unregistered users as well. So if you want to disallow use of commands by unregistered users, set default user capabilities to allow them, and set this to False.
422 See also <<capabilities,Capabilities>>.
426 Related plugins: [green]#Users#.
428 Supybot users are global: they are visible across networks. This means the same username/password and hostmasks will work in all networks the bot is on.
430 Users are recognized either by matching hostmasks, or after manually identifying to the bot. In secure mode, the user must both match a hostmask and identify to the bot (`uset set secure [password] <True|False>`).
432 NOTE: If users knowing each others' nicks is an issue, they could come up with different aliases when registering to the bot. The bot username does not have to match the nick of the user.
434 ==== Adding a new user ====
436 `user register <name> <password>`
438 ==== Manipulating hostmasks ====
440 `user hostmask add` - add your current hostmask. Obviously this makes only sense after identify.
442 `user hostmask add [name] [hostmask] [password]` - add hostmask for another user. If not owner, password must be given.
444 `user hostmask remove <name> <hostmask> [password]`
446 NOTE: There is no way to add network-specific hostmasks.
448 ==== Listing users ====
450 `user list [glob]` - list registered users. Note that the list of users is global across networks.
452 ==== Deleting users ====
454 `user unregister <name> [password]`
456 ==== Changing password ====
458 `user set password <user> <old password> <new password>`.
460 ==== Renaming a user ====
462 `user changename <name> <new name> [password]`
464 Users can change their name themselves.
466 [[user-capabilities]]
467 ==== Manipulating user capabilities ====
469 `capabilities [user]`::
470 List capabilities of the `user`, or the calling user.
472 `admin capability add <user|hostmask> <capability>`::
473 Add `capability` to `user` or a user that matches the `hostmask`.
475 `admin capability remove <user|hostmask> <capability>`::
476 Ditto, but remove the capability.
478 `channel capability add [channel] <nick|user> <capability..>`::
479 Add capability `capability` on `channel` to `nick`/`user`.
481 `channel capability remove [channel] <nick|user> <capability..>`::
482 Remove capability `capability` on `channel` from `nick`/`user`.
484 `defaultcapability <add|remove> <capability>`::
485 Add or remove `capability` from list of capabilities given to new users.
487 `config capabilities`::
488 List default capabilities given to new users.
492 -owner -admin -trusted
495 See also <<capabilities,Capabilities>>.
497 === General bot maintenance ===
499 Related plugins: [green]#Admin, Config#.
501 ==== Setting nickname & alternative nick ====
503 `admin nick <newnick>`::
504 Change nick to `newnick`.
509 `config nick.alternates`::
510 Space-separated list of alternate nicks, %s refers to nick.
512 NOTE: It is not possible to have a different nick in different networks.
514 ==== Setting ident ====
516 `config ident <newident>`::
517 Sets the bot's ident (`nick!ident@host`).
519 ==== Setting ircname ====
521 `config user [ircname]`::
522 Sets the bot's ircname/realname to `ircname`. If left empty, defaults to 'Supybot 0.83.3' for example.
524 ==== Setting command prefix / controlling when the bot replies ====
526 Like most other bots, the bot can be addressed by its nickname, or a command prefix character (any or many of `~!@#$%^&*()_-+=[{}]\|'";:,<.>/?`). For special (braindead?) purposes the bot can also be made assume that all lines are addressed to it.
528 `config reply.whenAddressedBy.chars`::
529 List of characters the bot will recognize as addressing, besides the nick of the bot.
531 `config channel [channel] reply.whenAddressedBy.chars`::
532 Ditto, but for a specific channel.
534 `config reply.whenNotAddressed`::
535 Assume everyone wants to talk to the bot, eg. treat all messages as if addressed to the bot. This does not imply `reply.WhenNotCommand False` which you should set as well.
537 `config reply.whenNotCommand`::
538 Whether to reply when addressed with an invalid command.
540 See also: <<config_reply,Configuration: reply>>.
542 ==== Keeping the primary nick ====
544 Like other bots, Supybot can be configured to try and keep the primary nick using the [green]#NickCapture# plugin. This is primarily useful in networks with no NickServ support.
547 Loads the plugin which works without further configuration.
549 `config plugins.NickCapture.ison`::
550 Whether the plugin is actively checking for the primary nick. This setting makes no sense, as you might as well `unload NickCapture` if you think about setting this to false.
552 `config plugins.NickCapture.ison.period`::
553 How many seconds to wait between nick availibity polls. The default is 600 (10 min). The smaller you set this, the higher the chance of the bot recovering the nick when it becomes available. On the other hand, you will also generate more traffic so you might want to avoid that.
555 === Owner commands ===
557 `owner announce <text>` - send `text` to all channels the bot is on.
559 `owner ircquote <raw>` - send `raw` as-is to the server. You need to know your way around http://www.faqs.org/rfcs/rfc1459.html[RFC1459] pretty well to use this.
563 [[searching-history]]
564 === Searching the history ===
566 `url last [channel] [\--{from,with,without,near,proto} value] [\--nolimit]`::
567 Find last URL (or all with `\--nolimit`) matching given criteria. From matches nick, with(out) part of the URL, near rest of the line where the URL was, and proto matches the protocol (https, ftp, etc). In case of multiple URLs, the newest is listed first. Multiple criterias can be given.
569 NOTE: This command lists only the URLs, not nick or what message the URLs were part of. No date is shown either.
571 `last [\--from,in,on,with,without,regexp} value] [\--nolimit]`::
572 Find messages matching given criteria. From matches nick, in matches channel, on matches network, with(out) matches part of the message, regexp matches messages that are included by the regular expression. Also see `config protocols.irc.maxHistoryLength`.
574 === Useful plugins ===
578 [green]#Dict# provides dictionary functionality using dict.org. You can also use a local dictd server.
580 `dict [dictionary] <word>`::
581 Show dictionary entry for `word`, from `dictionary` if provided. If `plugins.Dict.default` is set, use the specified dictionary instead of all.
584 List dictionaries available on the used server.
587 Show a random dictionary from available dictionaries.
589 `config plugins.Dict.server [server]`::
590 The dictd server to be used, default is dict.org.
592 `config plugins.Dict.default [dictionary]`::
593 Channel-specific default dictionary for `dict` command. `*` means to use all dictionaries. `wn` is a good default if english words are mostly looked up.
597 This is a nick-based replacement for NoteServ and the likes. Simply put, you give the bot a note to deliver to a nick (or wildcard) the next time it sees a matching nick. In other words, this can be used to deliver messages to people who are not registered to the bot. Naturally that is not a very safe method of communicating.
600 List nicks that have notes queued, or the notes queued for `nick` if given.
602 `later tell <nick> <text>`::
603 Queues `text` to be sent to first matching `nick` when seen. Nick can contain wildcards, eg. `foo*`.
605 `config plugins.Later.maximum`::
606 How many messages can be queued per nick at maximum, default is 0 = no limit.
608 `config plugins.Later.private`::
609 Whether to send notes in private or on the channel where the recipient is seen.
611 === Entertainment ===
613 ==== ChannelStats ====
615 [green]#ChannelStats# provides channel/registered user statistics (statistics as in 'large numbers').
617 `channelstats [channel]`:
618 Show statistics for `channel`: messages, characters, words, smileys, frowns, actions, joins, parts, quits, kicks, mode changes, and topic changes.
620 `stats [channel] [user]`:
621 Show statistics for `user` on `channel`: messages, characters, words, smileys, frowns, actions, joins, parts, quits, kicks given/received, topic changes, and mode changes.
623 WARNING: This plugin may turn otherwise normal users into spammers. But it can also provide an incentive to register on the bot. :-)
625 .plugins.ChannelStats
628 Key,Default,Description
630 #frowns,`:| :-/ :-\ :\ :/ :( :-( :'(`,Space-separated list of frowns.
631 #selfStats,`True`,Whether to include the bot in the statistics.
632 #smileys,`:) ;) ;] :-) :-D :D :P :p (= =)`,Space-separated list of smileys.
640 `dice <dices>d<sides>`::
641 Roll `dices` dices, each having `sides` sides. Lists result for each dice separately. The sum will be between `dices` and `dices` x `sides`.
643 `eightball [question]`::
644 Answers a question. But don't expect the bot to pass
646 `monologue [channel]`::
647 Check how long your monologue on the `channel` is, in case you are lose count. This is probably my favourite useless command.
649 `roulette ["spin"]`::
650 Russian roulette. If `spin` is given, spins the chambers. This isn't really necessary since it will be done automatically at the end of the round. Provides a different experience if the bot is opped.
655 Give an objective evaluation on the lameness of `nick`, or your nick if not provided. This is similar to the same command in blootbot.
659 The "lame nick-o-meter" reading for "1eEteStWaReZL0rD[69X~" is 99.98%.
664 `quote add [channel] <text>`::
665 Add `text` as a quote for `channel`.
667 `quote change [channel] <id> <regexp>`::
668 Change quote `id` on `channel` using `regexp`. For example, `s/foo/bar/g` changes all instances of `foo` to `bar`.
670 `quote get [channel] <id>`::
671 Show quote # `id` for `channel`.
673 `quote random [channel]`::
674 Show random quote from `channel`.
676 `quote remove [channel] <id>`::
677 Remove quote # `id` from `channel`.
679 `quote search [channel] [\--{regexp,by} value] [glob]`::
680 Find quotes from `channel` matching regexp if provided, added by nick `by` if provided, and matching `glob` if provided. `glob` may contain wildcards (eg. `foo*bar`), while `regexp` is a regular expression (eg. `/la.*laa/`). Note that you can really provide both regexp and the glob - both must match in that case.
682 `quote stats [channel]`::
683 Show how many quotes there are.
687 This plugin allows users to 'grab' the most recent line of another nick as a quote.
689 `quotegrabs get [channel] <id>`::
692 `quotegrabs grab [channel] <nick>`::
693 Save last line from `nick` as a quote.
695 `quotegrabs list [channel] <nick>`::
696 List quotes for `nick`, newest first. This does not display full quotes, but part of each, along with the id.
698 `quotegrabs quote [channel] <nick>`::
699 Show last quote of `nick`.
701 `quotegrabs random [channel] [nick]`::
702 Random quote from any nick, or `nick` if provided.
704 `quotegrabs search [channel] <text>`::
705 Show quotes containing `text`. Unfortunately, this does not list the nick or allow searching only given nick's quotes. Id and quote content will be shown.
710 Key,Default,Description
712 #randomGrabber,False,Whether to grab random lines as quotes.
713 #randomGrabber.averageTimeBetweenGrabs,864000,Average number of seconds to wait between random grabs. When half of this has passed a random grab may occur.
714 randomGrabber.minimumCharacters,8,Minimum characters needed to consider a line eligible for random grab.
715 randomGrabber.minimumWords,3,"Ditto, but for words."
720 This is a list of issues I have not yet figured out how to do, or there simply isn't a way.
722 - How to enforce channel modes (eg. force +ns-t for example)
723 - How to delete config items
724 - How to delete channels / networks
725 - Ban add does not seem to work on Freenode
727 - No way to delete a network
728 - Incomplete multi-network support
729 * Capabilities are not network/channel -specific, but channel-specific. If channel by same name exists in two networks, the users have same capabilities on both
730 * No way to add network-specific hostmasks
731 * Not possible for the bot to have different nick in different networks
732 - There is no command to reboot the bot; it must be done from the shell
733 - Capabilities/anticapabilities for commands with spaces in them are not supported
737 === How to emulate blootbot CMDs using MoobotFactoids ===
739 [,yellow]#Thanks to Tobias "beardy" Rosenqvist for the tip!#
741 We try to make a command factoid, like we are used to with blootbot:
744 <user> cmdtest is <action> gives $1 "(an apple|a pear)"
751 <user> cmdtest someone
755 However, the factoid works:
759 * bot gives $1 an apple
762 The Moobotfactoids plugin in supybot doesn't handle arguments, (yet)
763 unfortunately, so you need to do it another way.
764 Use the Moobotfactoids to do the random part(s):
767 <user> fruits is <reply> "(an apple|an orange|a banana|a pear)"
771 Then use an alias to do the command, with arguments (the "action" command
772 is found in the Reply plugin), here you also see a use of a nested command:
775 <user> alias add givefruit action gives "[fruits]" to $1
777 <user> givefruit someone
778 * bot gives a pear to someone
781 === Tidier bot replies ===
783 I don't personally like the default Supybot replies: I hate the nick prefix and the way too verbose 'The operation succeeded.'.
785 Fortunately there are plenty of settings to configure how Supybot replies. These can be listed with `config reply` and `config replies`.
787 The `reply` items determine how Supybot acts, and `replies` contains some messages it uses. I prefer:
789 `config reply.withNickPrefix False`
791 `config replies.success OK`
793 `config reply.error.inPrivate True`.
795 === More on nested commands ===
797 [,yellow]#Thanks to Tobias "beardy" Rosenqvist for the tip!#
799 For those familliar with unix shells, (bash in particular), nested commands can be compared to doing command substitution, as in `$(command)`.
801 Nested commands are by default enclosed by square brackets (`[]`). The `commands.nested.brackets` configuration variable can be used to set these to `<>`, `{}`, or `()`.
804 <user> echo The title of the Supybot website is: [web title http://www.supybot.com/]
805 <bot> The title of the Supybot website is: Welcome to Supybot.com! Supybot Website
808 Another way nested commands can work, is like a pipe, if the configuration variable `commands.nested.pipeSyntax` is set to `True`.
810 Same example as above, but using the pipeSyntax:
813 <user> web title http://www.supybot.com/ | echo The title of the Supybot website is:
814 <bot> The title of the Supybot website is: Welcome to Supybot.com! Supybot Website
819 === Configuration ===
824 *#inPrivate*:: Whether to reply in private to commands given on channel.
826 *#requireChannelCommandsToBeSentInChannel*:: -
828 *#showSimpleSyntax*:: Whether to be extra helpful when a user fails syntax of a command.
830 *#whenNotAddressed*:: Assume everyone wants to talk to the bot, eg. treat all messages as if addressed to the bot. This does not imply `reply.WhenNotCommand False` which you should set as well.
832 *#whenNotCommand*:: Whether to reply when addressed with an invalid command.
834 *#withNickPrefix*:: Whether to prefix the reply with the nick of the user who gave the command.
836 *#withNotice*:: Whether to use notices instead of regular messages.
838 *#mores.instant*:: How many messages to send initially before prompting for `more`. Default is 1.
840 *#mores.length*:: How long messages can be. Default is 0, which uses rocket science to determine the maximum number of characters that can be fit into a message without it collapsing into a black hole.
842 *#mores.maximum*:: Maximum number of messages to queue, default is 50.
844 *#error.inPrivate*:: Whether to send errors in private instead of replying on channel.
846 *#error.noCapability*:: If True, don't tell users why they can not run a command because of missing capabilities.
848 *#error.withNotice*:: Whether to send errors as notices instead of regular messages.
850 *error.detailed*:: Whether to show an exception or a generic error when something breaks. Mostly useful for developers.
852 *#format.time*:: Format string for timestamps (`%I:%M %p, %B %d, %Y`, eg. '08:41 PM, September 11, 2008').
854 *#whenAddressedBy.chars*:: List of characters the bot will recognize as addressing (when a command is prefixed with one of them), besides the nick of the bot.
856 *#whenAddressedBy.nicks*:: List of extra nicks to consider as addressing the bot, despite the current nick.
858 *#whenAddressedBy.strings*:: Like the chars key, except a space-separated list of strings to accept as command prefix. This allows multicharacter command prefixes.
860 *#whenAddressedBy.nick.atEnd*:: Whether to consider messages that end in the bot's nick to be addressed to the bot.
862 *maximumLength*:: Maximum length of a reply message from the bot. This does not mean the length of a single message (prompting for `more`), but the whole message.
864 *oneToOne*:: Whether to send replies consisting of multiple messages in a single message.
866 *withNoticeWhenPrivate*:: Whether to use notices instead of private messages.