diff --git a/plugins/Admin/README.rst b/plugins/Admin/README.rst new file mode 100644 index 000000000..b14fe718c --- /dev/null +++ b/plugins/Admin/README.rst @@ -0,0 +1,55 @@ +.. _plugin-Admin: + +Documentation for the Admin plugin for Supybot +============================================== + +Purpose +------- +These are commands useful for administrating the bot; they all require their +caller to have the 'admin' capability. This plugin is loaded by default. + +Usage +----- +This plugin provides access to administrative commands, such as +adding capabilities, managing ignore lists, and joining channels. +This is a core Supybot plugin that should not be removed! + +Commands +-------- +acmd [ ...] + Perform (with associated s on all channels on current network. + +capability add + Gives the user specified by (or the user to whom currently maps) the specified capability + +capability remove + Takes from the user specified by (or the user to whom currently maps) the specified capability + +channels takes no arguments + Returns the channels the bot is on. + +clearq takes no arguments + Clears the current send queue for this network. + +ignore add [] + This will set a persistent ignore on or the hostmask currently associated with . is an optional argument specifying when (in "seconds from now") the ignore will expire; if it isn't given, the ignore will never automatically expire. + +ignore list takes no arguments + Lists the hostmasks that the bot is ignoring. + +ignore remove + This will remove the persistent ignore on or the hostmask currently associated with . + +join [] + Tell the bot to join the given channel. If is given, it is used when attempting to join the channel. + +nick [] [] + Changes the bot's nick to . If no nick is given, returns the bot's current nick. + +Configuration +------------- +supybot.plugins.Admin.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Aka/README.md b/plugins/Aka/README.md deleted file mode 100644 index a6ccaf226..000000000 --- a/plugins/Aka/README.md +++ /dev/null @@ -1,74 +0,0 @@ -This plugin allows the user to create various aliases (known as "Akas", -since Alias is the name of another plugin Aka is based on) to other -commands or combinations of other commands (via nested commands). -It is a good idea to always quote the commands that are being aliased so -that any nested commands are not immediately run. - -Basic usage ------------ - -### Alias - -Add an aka, Alias, which eases the transitioning to Aka from Alias. - -First we will load Alias and Aka. - -``` - @load Alias - jamessan: The operation succeeded. - @load Aka - jamessan: The operation succeeded. - -``` - -Then we import the Alias database to Aka in case it exists and unload -Alias. - -``` - @importaliasdatabase - jamessan: The operation succeeded. - @unload Alias - jamessan: The operation succeeded. -``` - -And now we will finally add the Aka `alias` itself. - -``` - @aka add "alias" "aka $1 $*" - jamessan: The operation succeeded. -``` - -Now you can use Aka as you used Alias before. - -### Trout - -Add an aka, trout, which expects a word as an argument - -``` - @aka add trout "reply action slaps $1 with a large trout" - jamessan: The operation succeeded. - @trout me -* bot slaps me with a large trout -``` - -This `trout` aka requires the plugin `Reply` to be loaded since it -provides the `action` command. - -### LastFM - -Add an aka, `lastfm`, which expects a last.fm username and replies with -their most recently played item. - -``` -@aka add lastfm "rss [format concat http://ws.audioscrobbler.com/1.0/user/ [format concat [web urlquote $1] /recenttracks.rss]]" -``` - -This `lastfm` aka requires the following plugins to be loaded: `RSS`, -`Format` and `Web`. - -`RSS` provides `rss`, `Format` provides `concat` and `Web` provides -`urlquote`. - -Note that if the nested commands being aliased hadn't been quoted, then -those commands would have been run immediately, and `@lastfm` would always -reply with the same information, the result of those commands. diff --git a/plugins/Aka/README.rst b/plugins/Aka/README.rst new file mode 100644 index 000000000..f1ac39270 --- /dev/null +++ b/plugins/Aka/README.rst @@ -0,0 +1,115 @@ +.. _plugin-Aka: + +Documentation for the Aka plugin for Supybot +============================================ + +Purpose +------- +This plugin allows the user to create various aliases (known as "Akas", since +Alias is the name of another plugin Aka is based on) to other commands or +combinations of other commands (via nested commands). + +Usage +----- +This plugin allows users to define aliases to commands and combinations +of commands (via nesting). + +Importing from Alias +^^^^^^^^^^^^^^^^^^^^ + +Add an aka, Alias, which eases the transitioning to Aka from Alias. + +First we will load Alias and Aka:: + + @load Alias + jamessan: The operation succeeded. + @load Aka + jamessan: The operation succeeded. + +Then we import the Alias database to Aka in case it exists and unload +Alias:: + + @importaliasdatabase + jamessan: The operation succeeded. + @unload Alias + jamessan: The operation succeeded. + +And now we will finally add the Aka ``alias`` itself:: + + @aka add "alias" "aka $1 $*" + jamessan: The operation succeeded. + +Now you can use Aka as you used Alias before. + +Trout +^^^^^ + +Add an aka, trout, which expects a word as an argument:: + + @aka add trout "reply action slaps $1 with a large trout" + jamessan: The operation succeeded. + @trout me + * bot slaps me with a large trout + +This ``trout`` aka requires the plugin ``Reply`` to be loaded since it +provides the ``action`` command. + +LastFM +^^^^^^ + +Add an aka, ``lastfm``, which expects a last.fm username and replies with +their most recently played item:: + + @aka add lastfm "rss [format concat http://ws.audioscrobbler.com/1.0/user/ [format concat [web urlquote $1] /recenttracks.rss]]" + +This ``lastfm`` aka requires the following plugins to be loaded: ``RSS``, +``Format`` and ``Web``. + +``RSS`` provides ``rss``, ``Format`` provides ``concat`` and ``Web`` provides +``urlquote``. + +Note that if the nested commands being aliased hadn't been quoted, then +those commands would have been run immediately, and ``@lastfm`` would always +reply with the same information, the result of those commands. + +Commands +-------- +add [--channel <#channel>] + Defines an alias that executes . The should be in the standard "command argument [nestedcommand argument]" arguments to the alias; they'll be filled with the first, second, etc. arguments. $1, $2, etc. can be used for required arguments. @1, @2, etc. can be used for optional arguments. $* simply means "all arguments that have not replaced $1, $2, etc.", ie. it will also include optional arguments. + +remove [--channel <#channel>] + Removes the given alias, if unlocked. + +lock [--channel <#channel>] + Locks an alias so that no one else can change it. + +unlock [--channel <#channel>] + Unlocks an alias so that people can define new aliases over it. + +importaliasdatabase takes no arguments + Imports the Alias database into Aka's, and clean the former. + +show [--channel <#channel>] + This command shows the content of an Aka. + +list [--channel <#channel>] [--keys] [--unlocked|--locked] + Lists all Akas defined for . If is not specified, lists all global Akas. If --keys is given, lists only the Aka names and not their commands. + +set [--channel <#channel>] + Overwrites an existing alias to execute instead. The should be in the standard "command argument [nestedcommand argument]" arguments to the alias; they'll be filled with the first, second, etc. arguments. $1, $2, etc. can be used for required arguments. @1, @2, etc. can be used for optional arguments. $* simply means "all arguments that have not replaced $1, $2, etc.", ie. it will also include optional arguments. + +search [--channel <#channel>] + Searches Akas defined for . If is not specified, searches all global Akas. + +Configuration +------------- +supybot.plugins.Aka.maximumWordsInName + This config variable defaults to "5", is not network-specific, and is not channel-specific. + + The maximum number of words allowed in a command name. Setting this to an high value may slow down your bot on long commands. + +supybot.plugins.Aka.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Aka/plugin.py b/plugins/Aka/plugin.py index d887f52ad..333e898d7 100644 --- a/plugins/Aka/plugin.py +++ b/plugins/Aka/plugin.py @@ -498,8 +498,68 @@ class AkaHTTPCallback(httpserver.SupyHTTPServerCallback): class Aka(callbacks.Plugin): - """This plugin allows users to define aliases to commands and combinations - of commands (via nesting).""" + """ + This plugin allows users to define aliases to commands and combinations + of commands (via nesting). + + Importing from Alias + ^^^^^^^^^^^^^^^^^^^^ + + Add an aka, Alias, which eases the transitioning to Aka from Alias. + + First we will load Alias and Aka:: + + @load Alias + jamessan: The operation succeeded. + @load Aka + jamessan: The operation succeeded. + + Then we import the Alias database to Aka in case it exists and unload + Alias:: + + @importaliasdatabase + jamessan: The operation succeeded. + @unload Alias + jamessan: The operation succeeded. + + And now we will finally add the Aka ``alias`` itself:: + + @aka add "alias" "aka $1 $*" + jamessan: The operation succeeded. + + Now you can use Aka as you used Alias before. + + Trout + ^^^^^ + + Add an aka, trout, which expects a word as an argument:: + + @aka add trout "reply action slaps $1 with a large trout" + jamessan: The operation succeeded. + @trout me + * bot slaps me with a large trout + + This ``trout`` aka requires the plugin ``Reply`` to be loaded since it + provides the ``action`` command. + + LastFM + ^^^^^^ + + Add an aka, ``lastfm``, which expects a last.fm username and replies with + their most recently played item:: + + @aka add lastfm "rss [format concat http://ws.audioscrobbler.com/1.0/user/ [format concat [web urlquote $1] /recenttracks.rss]]" + + This ``lastfm`` aka requires the following plugins to be loaded: ``RSS``, + ``Format`` and ``Web``. + + ``RSS`` provides ``rss``, ``Format`` provides ``concat`` and ``Web`` provides + ``urlquote``. + + Note that if the nested commands being aliased hadn't been quoted, then + those commands would have been run immediately, and ``@lastfm`` would always + reply with the same information, the result of those commands. + """ def __init__(self, irc): self.__parent = super(Aka, self) diff --git a/plugins/Alias/README.md b/plugins/Alias/README.md deleted file mode 100644 index f8d0eed59..000000000 --- a/plugins/Alias/README.md +++ /dev/null @@ -1,27 +0,0 @@ -This plugin allows the user to create various aliases to other commands -or combinations of other commands (via nested commands). It is a good -idea to always quote the commands that are being aliased so that any -nested commands are not immediately run. - -Basic usage ------------ - -Add an alias, `trout`, which expects a word as an argument - -``` - @alias add trout "action slaps $1 with a large trout" - jamessan: The operation succeeded. - @trout me -* bot slaps me with a large trout -``` - -Add an alias, `lastfm`, which expects a last.fm user and replies with -their recently played items. - -``` -@alias add lastfm "rss [format concat http://ws.audioscrobbler.com/1.0/user/ [format concat [urlquote $1] /recenttracks.rss]]" -``` - -Note that if the nested commands being aliased hadn't been quoted, then -those commands would have been run immediately, and `@lastfm` would always -reply with the same information, the result of those commands. diff --git a/plugins/Alias/README.rst b/plugins/Alias/README.rst new file mode 100644 index 000000000..bb4a83f5f --- /dev/null +++ b/plugins/Alias/README.rst @@ -0,0 +1,63 @@ +.. _plugin-Alias: + +Documentation for the Alias plugin for Supybot +============================================== + +Purpose +------- +Allows aliases for other commands. NOTE THAT IT'S RECOMMENDED TO USE Aka +PLUGIN INSTEAD! + +Usage +----- +This plugin allows users to define aliases to commands and combinations +of commands (via nesting). +This plugin is only kept for backward compatibility, you should use the +built-in Aka plugin instead (you can migrate your existing aliases using +the 'importaliasdatabase' command. + +To add an alias, `trout`, which expects a word as an argument:: + + @alias add trout "action slaps $1 with a large trout" + jamessan: The operation succeeded. + @trout me + * bot slaps me with a large trout + +To add an alias, `lastfm`, which expects a last.fm user and replies with +their recently played items:: + + @alias add lastfm "rss [format concat http://ws.audioscrobbler.com/1.0/user/ [format concat [urlquote $1] /recenttracks.rss]]" + +Note that if the nested commands being aliased hadn't been quoted, then +those commands would have been run immediately, and `@lastfm` would always +reply with the same information, the result of those commands. + +Commands +-------- +add + Defines an alias that executes . The should be in the standard "command argument [nestedcommand argument]" arguments to the alias; they'll be filled with the first, second, etc. arguments. $1, $2, etc. can be used for required arguments. @1, @2, etc. can be used for optional arguments. $* simply means "all remaining arguments," and cannot be combined with optional arguments. + +list [--locked|--unlocked] + Lists alias names of a particular type, defaults to all aliases if no --locked or --unlocked option is given. + +lock + Locks an alias so that no one else can change it. + +remove + Removes the given alias, if unlocked. + +unlock + Unlocks an alias so that people can define new aliases over it. + +Configuration +------------- +supybot.plugins.Alias.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Alias.validName + This config variable defaults to "^[^\\x00-\\x20]+$", is not network-specific, and is not channel-specific. + + Regex which alias names must match in order to be valid + diff --git a/plugins/Alias/plugin.py b/plugins/Alias/plugin.py index a32a4db57..c23d4cbbe 100644 --- a/plugins/Alias/plugin.py +++ b/plugins/Alias/plugin.py @@ -235,11 +235,29 @@ def makeNewAlias(name, alias): return f class Alias(callbacks.Plugin): - """This plugin allows users to define aliases to commands and combinations + """ + This plugin allows users to define aliases to commands and combinations of commands (via nesting). This plugin is only kept for backward compatibility, you should use the built-in Aka plugin instead (you can migrate your existing aliases using - the 'importaliasdatabase' command.""" + the 'importaliasdatabase' command. + + To add an alias, `trout`, which expects a word as an argument:: + + @alias add trout "action slaps $1 with a large trout" + jamessan: The operation succeeded. + @trout me + * bot slaps me with a large trout + + To add an alias, `lastfm`, which expects a last.fm user and replies with + their recently played items:: + + @alias add lastfm "rss [format concat http://ws.audioscrobbler.com/1.0/user/ [format concat [urlquote $1] /recenttracks.rss]]" + + Note that if the nested commands being aliased hadn't been quoted, then + those commands would have been run immediately, and `@lastfm` would always + reply with the same information, the result of those commands. + """ def __init__(self, irc): self.__parent = super(Alias, self) self.__parent.__init__(irc) diff --git a/plugins/Anonymous/README.md b/plugins/Anonymous/README.md deleted file mode 100644 index a10144f16..000000000 --- a/plugins/Anonymous/README.md +++ /dev/null @@ -1,27 +0,0 @@ -Anonymous allows you to send messages anonymously as the bot. If -`supybot.plugins.Anonymous.allowPrivateTarget` is `True`, you can send -messages in query too. - -## Usage examples - -### Proving that you are the owner. - -When you ask for cloak/vhost for your bot, the network operators will -often ask you to prove that you own the bot. You can do this for example -with the following method: - -``` -@load Anonymous -@config plugins.anonymous.requirecapability owner -@config plugins.anonymous.allowprivatetarget True -@anonymous say Hi, my owner is :) -``` - -This -* Loads the plugin. -* Makes the plugin require that you are the owner - * If anyone could send private messages as the bot, they could also - access network services. -* Allows sending private messages -* Sends message `Hi, my owner is :)` to `operator nick`. - * Note that you won't see the messages that are sent to the bot. diff --git a/plugins/Anonymous/README.rst b/plugins/Anonymous/README.rst new file mode 100644 index 000000000..b5368337a --- /dev/null +++ b/plugins/Anonymous/README.rst @@ -0,0 +1,87 @@ +.. _plugin-Anonymous: + +Documentation for the Anonymous plugin for Supybot +================================================== + +Purpose +------- +Allows folks to talk through the bot anonymously. + +Usage +----- +This plugin allows users to act through the bot anonymously. The 'do' +command has the bot perform an anonymous action in a given channel, and +the 'say' command allows other people to speak through the bot. Since +this can be fairly well abused, you might want to set +supybot.plugins.Anonymous.requireCapability so only users with that +capability can use this plugin. For extra security, you can require that +the user be *in* the channel they are trying to address anonymously with +supybot.plugins.Anonymous.requirePresenceInChannel, or you can require +that the user be registered by setting +supybot.plugins.Anonymous.requireRegistration. + +Example: Proving that you are the owner +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When you ask for cloak/vhost for your bot, the network operators will +often ask you to prove that you own the bot. You can do this for example +with the following method:: + + @load Anonymous + @config plugins.anonymous.requirecapability owner + @config plugins.anonymous.allowprivatetarget True + @anonymous say Hi, my owner is :) + +This +* Loads the plugin. +* Makes the plugin require that you are the owner + + * If anyone could send private messages as the bot, they could also + access network services. + +* Allows sending private messages +* Sends message ``Hi, my owner is :)`` to ``operator nick``. + + * Note that you won't see the messages that are sent to the bot. + +Commands +-------- +do + Performs in . + +react + Sends the to 's last message. is typically a smiley or an emoji. This may not be supported on the current network, as this command depends on IRCv3 features. This is also not supported if supybot.protocols.irc.experimentalExtensions disabled (don't enable it unless you know what you are doing). + +say + Sends to . + +tell + Sends to . Can only be used if supybot.plugins.Anonymous.allowPrivateTarget is True. + +Configuration +------------- +supybot.plugins.Anonymous.allowPrivateTarget + This config variable defaults to "False", is not network-specific, and is not channel-specific. + + Determines whether the bot will allow the "tell" command to be used. If true, the bot will allow the "tell" command to send private messages to other users. + +supybot.plugins.Anonymous.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Anonymous.requireCapability + This config variable defaults to "", is network-specific, and is channel-specific. + + Determines what capability (if any) the bot should require people trying to use this plugin to have. + +supybot.plugins.Anonymous.requirePresenceInChannel + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot should require people trying to use this plugin to be in the channel they wish to anonymously send to. + +supybot.plugins.Anonymous.requireRegistration + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot should require people trying to use this plugin to be registered. + diff --git a/plugins/Anonymous/plugin.py b/plugins/Anonymous/plugin.py index 6c00daa21..9713e3067 100644 --- a/plugins/Anonymous/plugin.py +++ b/plugins/Anonymous/plugin.py @@ -42,7 +42,8 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Anonymous') class Anonymous(callbacks.Plugin): - """This plugin allows users to act through the bot anonymously. The 'do' + """ + This plugin allows users to act through the bot anonymously. The 'do' command has the bot perform an anonymous action in a given channel, and the 'say' command allows other people to speak through the bot. Since this can be fairly well abused, you might want to set @@ -52,6 +53,31 @@ class Anonymous(callbacks.Plugin): supybot.plugins.Anonymous.requirePresenceInChannel, or you can require that the user be registered by setting supybot.plugins.Anonymous.requireRegistration. + + Example: Proving that you are the owner + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + When you ask for cloak/vhost for your bot, the network operators will + often ask you to prove that you own the bot. You can do this for example + with the following method:: + + @load Anonymous + @config plugins.anonymous.requirecapability owner + @config plugins.anonymous.allowprivatetarget True + @anonymous say Hi, my owner is :) + + This + * Loads the plugin. + * Makes the plugin require that you are the owner + + * If anyone could send private messages as the bot, they could also + access network services. + + * Allows sending private messages + * Sends message ``Hi, my owner is :)`` to ``operator nick``. + + * Note that you won't see the messages that are sent to the bot. + """ def _preCheck(self, irc, msg, target, action): if self.registryValue('requireRegistration', target, irc.network): diff --git a/plugins/AutoMode/README.md b/plugins/AutoMode/README.md deleted file mode 100644 index d5380b950..000000000 --- a/plugins/AutoMode/README.md +++ /dev/null @@ -1,15 +0,0 @@ -This plugin sets channel modes on users when they join the channel -depending on the configuration. - -If -* `plugins.automode.op` is set to `True`, users with the `#channel,op` -capability are opped when they join. -* `plugins.automode.halfop` is set to `True`, users with the -`#channel,halfop` are halfopped when they join. -* `plugins.automode.voice` is set to `True`, users with the -`#channel,voice` are voiced when they join. - -This plugin also kbans people on `@channel ban list` -(`config plugins.automode.ban`) when they join and if moding users with -lower capability is enabled, that is also applied to users with higher -capability (`config plugins.automode.fallthrough). diff --git a/plugins/AutoMode/README.rst b/plugins/AutoMode/README.rst new file mode 100644 index 000000000..6944fab27 --- /dev/null +++ b/plugins/AutoMode/README.rst @@ -0,0 +1,90 @@ +.. _plugin-AutoMode: + +Documentation for the AutoMode plugin for Supybot +================================================= + +Purpose +------- +Automatically ops, voices, or halfops, or bans people when they join a channel, +according to their capabilities. If you want your bot automatically op users +when they join your channel, this is the plugin to load. + +Usage +----- +This plugin, when configured, allows the bot to automatically set modes +on users when they join. + +* if ``plugins.automode.op`` is set to ``True``, users with the + ``#channel,op`` capability are opped when they join. +* if ``plugins.automode.halfop`` is set to ``True``, users with the + ``#channel,halfop`` are halfopped when they join. +* if ``plugins.automode.voice`` is set to ``True``, users with the + ``#channel,voice`` are voiced when they join. + +This plugin also kbans people on ``@channel ban list`` +(``config plugins.automode.ban``) when they join and if moding users with +lower capability is enabled, that is also applied to users with higher +capability (``config plugins.automode.fallthrough``). + +Configuration +------------- +supybot.plugins.AutoMode.alternativeCapabilities + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will check for 'alternative capabilities' (ie. autoop, autohalfop, autovoice) in addition to/instead of classic ones. + +supybot.plugins.AutoMode.ban + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will automatically ban people who join the channel and are on the banlist. + + supybot.plugins.AutoMode.ban.period + This config variable defaults to "86400", is network-specific, and is channel-specific. + + Determines how many seconds the bot will automatically ban a person when banning. + +supybot.plugins.AutoMode.delay + This config variable defaults to "0", is network-specific, and is channel-specific. + + Determines how many seconds the bot will wait before applying a mode. Has no effect on bans. + +supybot.plugins.AutoMode.enable + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether this plugin is enabled. + +supybot.plugins.AutoMode.extra + This config variable defaults to " ", is network-specific, and is channel-specific. + + Extra modes that will be applied to a user. Example syntax: user1+o-v user2+v user3-v + +supybot.plugins.AutoMode.fallthrough + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will "fall through" to halfop/voicing when auto-opping is turned off but auto-halfopping/voicing are turned on. + +supybot.plugins.AutoMode.halfop + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will automatically halfop people with the ,halfop capability when they join the channel. + +supybot.plugins.AutoMode.op + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will automatically op people with the ,op capability when they join the channel. + +supybot.plugins.AutoMode.owner + This config variable defaults to "False", is not network-specific, and is not channel-specific. + + Determines whether this plugin will automode owners even if they don't have op/halfop/voice/whatever capability. + +supybot.plugins.AutoMode.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.AutoMode.voice + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will automatically voice people with the ,voice capability when they join the channel. + diff --git a/plugins/AutoMode/plugin.py b/plugins/AutoMode/plugin.py index 672cf2cf0..9d4d7575b 100644 --- a/plugins/AutoMode/plugin.py +++ b/plugins/AutoMode/plugin.py @@ -45,8 +45,23 @@ class Continue(Exception): pass # Used below, look in the "do" function nested in doJoin. class AutoMode(callbacks.Plugin): - """This plugin, when configured, allows the bot to automatically set modes - on users when they join.""" + """ + This plugin, when configured, allows the bot to automatically set modes + on users when they join. + + * if ``plugins.automode.op`` is set to ``True``, users with the + ``#channel,op`` capability are opped when they join. + * if ``plugins.automode.halfop`` is set to ``True``, users with the + ``#channel,halfop`` are halfopped when they join. + * if ``plugins.automode.voice`` is set to ``True``, users with the + ``#channel,voice`` are voiced when they join. + + This plugin also kbans people on ``@channel ban list`` + (``config plugins.automode.ban``) when they join and if moding users with + lower capability is enabled, that is also applied to users with higher + capability (``config plugins.automode.fallthrough``). + + """ def doJoin(self, irc, msg): channel = msg.channel network = irc.network diff --git a/plugins/Autocomplete/README.md b/plugins/Autocomplete/README.md deleted file mode 100644 index 2209a4c5b..000000000 --- a/plugins/Autocomplete/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Provides command completion for IRC clients that support it. - -This plugin implements an early draft of the IRCv3 autocompletion client tags. -As this is not yet a released specification, it does nothing unless -`supybot.protocols.irc.experimentalExtensions` is set to True (keep it set to -False unless you know what you are doing). - -If you are interested in this feature, please contribute to -[the discussion](https://github.com/ircv3/ircv3-specifications/pull/415) diff --git a/plugins/Autocomplete/README.rst b/plugins/Autocomplete/README.rst new file mode 100644 index 000000000..858b274c9 --- /dev/null +++ b/plugins/Autocomplete/README.rst @@ -0,0 +1,33 @@ +.. _plugin-Autocomplete: + +Documentation for the Autocomplete plugin for Supybot +===================================================== + +Purpose +------- +Autocomplete: Provides command autocompletion for IRC clients that support it. + +This plugin implements an early draft of the IRCv3 autocompletion client tags. +As this is not yet a released specification, it does nothing unless +``supybot.protocols.irc.experimentalExtensions`` is set to True (keep it set to +False unless you know what you are doing). + +If you are interested in this feature, please contribute to +`the discussion `_ + +Usage +----- +Provides command completion for IRC clients that support it. + +Configuration +------------- +supybot.plugins.Autocomplete.enabled + This config variable defaults to "False", is network-specific, and is channel-specific. + + Whether the bot should reply to autocomplete requests from clients. + +supybot.plugins.Autocomplete.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Autocomplete/__init__.py b/plugins/Autocomplete/__init__.py index 1dbb0d94a..666fc256b 100644 --- a/plugins/Autocomplete/__init__.py +++ b/plugins/Autocomplete/__init__.py @@ -30,6 +30,14 @@ """ Autocomplete: Provides command autocompletion for IRC clients that support it. + +This plugin implements an early draft of the IRCv3 autocompletion client tags. +As this is not yet a released specification, it does nothing unless +``supybot.protocols.irc.experimentalExtensions`` is set to True (keep it set to +False unless you know what you are doing). + +If you are interested in this feature, please contribute to +`the discussion `_ """ import sys diff --git a/plugins/BadWords/README.md b/plugins/BadWords/README.md deleted file mode 100644 index 8cb3e645c..000000000 --- a/plugins/BadWords/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This plugin ensures that the bot won't say any words the bot owner finds -offensive. As an additional capability, it can (optionally) kick users who -use such words from channels that have that capability enabled. diff --git a/plugins/BadWords/README.rst b/plugins/BadWords/README.rst new file mode 100644 index 000000000..26edec084 --- /dev/null +++ b/plugins/BadWords/README.rst @@ -0,0 +1,81 @@ +.. _plugin-BadWords: + +Documentation for the BadWords plugin for Supybot +================================================= + +Purpose +------- +Filters bad words on outgoing messages from the bot, so the bot can't be made +to say bad words. +As an additional capability, it can (optionally) kick users who +use such words from channels that have that capability enabled. + +Usage +----- +Maintains a list of words that the bot is not allowed to say. +Can also be used to kick people that say these words, if the bot +has op. + +Commands +-------- +add [ ...] + Adds all s to the list of words being censored. + +list takes no arguments + Returns the list of words being censored. + +remove [ ...] + Removes s from the list of words being censored. + +Configuration +------------- +supybot.plugins.BadWords.kick + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will kick people with a warning when they use bad words. + + supybot.plugins.BadWords.kick.message + This config variable defaults to "You have been kicked for using a word prohibited in the presence of this bot. Please use more appropriate language in the future.", is network-specific, and is channel-specific. + + Determines the kick message used by the bot when kicking users for saying bad words. + +supybot.plugins.BadWords.nastyChars + This config variable defaults to "!@#&", is not network-specific, and is not channel-specific. + + Determines what characters will replace bad words; a chunk of these characters matching the size of the replaced bad word will be used to replace the bad words you've configured. + +supybot.plugins.BadWords.phrases + This config variable defaults to " ", is not network-specific, and is not channel-specific. + + Comma-separated groups of words that are considered to be 'bad'. + +supybot.plugins.BadWords.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.BadWords.replaceMethod + This config variable defaults to "nastyCharacters", is not network-specific, and is not channel-specific. + + Determines the manner in which bad words will be replaced. 'nastyCharacters' (the default) will replace a bad word with the same number of 'nasty characters' (like those used in comic books; configurable by supybot.plugins.BadWords.nastyChars). 'simple' will replace a bad word with a simple strings (regardless of the length of the bad word); this string is configurable via supybot.plugins.BadWords.simpleReplacement. Valid strings: simple and nastyCharacters. + +supybot.plugins.BadWords.requireWordBoundaries + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will require bad words to be independent words, or whether it will censor them within other words. For instance, if 'darn' is a bad word, then if this is true, 'darn' will be censored, but 'darnit' will not. You probably want this to be false. After changing this setting, the BadWords regexp needs to be regenerated by adding/removing a word to the list, or reloading the plugin. + +supybot.plugins.BadWords.simpleReplacement + This config variable defaults to "[CENSORED]", is not network-specific, and is not channel-specific. + + Determines what word will replace bad words if the replacement method is 'simple'. + +supybot.plugins.BadWords.stripFormatting + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether the bot will strip formatting characters from messages before it checks them for bad words. If this is False, it will be relatively trivial to circumvent this plugin's filtering. If it's True, however, it will interact poorly with other plugins that do coloring or bolding of text. + +supybot.plugins.BadWords.words + This config variable defaults to " ", is not network-specific, and is not channel-specific. + + Determines what words are considered to be 'bad' so the bot won't say them. + diff --git a/plugins/BadWords/__init__.py b/plugins/BadWords/__init__.py index f4da833c8..652e9788d 100644 --- a/plugins/BadWords/__init__.py +++ b/plugins/BadWords/__init__.py @@ -30,6 +30,8 @@ """ Filters bad words on outgoing messages from the bot, so the bot can't be made to say bad words. +As an additional capability, it can (optionally) kick users who +use such words from channels that have that capability enabled. """ import supybot diff --git a/plugins/Channel/README.rst b/plugins/Channel/README.rst new file mode 100644 index 000000000..1057de291 --- /dev/null +++ b/plugins/Channel/README.rst @@ -0,0 +1,162 @@ +.. _plugin-Channel: + +Documentation for the Channel plugin for Supybot +================================================ + +Purpose +------- +Basic channel management commands. Many of these commands require their caller +to have the #channel,op capability. This plugin is loaded by default. + +Usage +----- +This plugin provides various commands for channel management, such +as setting modes and channel-wide bans/ignores/capabilities. This is +a core Supybot plugin that should not be removed! + +Commands +-------- +alert [] + Sends to all the users in who have the ,op capability. + +ban add [] [] + If you have the #channel,op capability, this will effect a persistent ban from interacting with the bot on the given (or the current hostmask associated with ). Other plugins may enforce this ban by actually banning users with matching hostmasks when they join. is an optional argument specifying when (in "seconds from now") the ban should expire; if none is given, the ban will never automatically expire. is only necessary if the message isn't sent in the channel itself. + +ban hostmask [] + Bans the from the . + +ban list [] [] + If you have the #channel,op capability, this will show you the current persistent bans on the that match the given mask, if any (returns all of them otherwise). Note that you can use * as a wildcard on masks and \* to match actual * in masks + +ban remove [] + If you have the #channel,op capability, this will remove the persistent ban on . is only necessary if the message isn't sent in the channel itself. + +capability add [] [ ...] + If you have the #channel,op capability, this will give the (or the user to whom maps) the capability in the channel. is only necessary if the message isn't sent in the channel itself. + +capability list [] + Returns the capabilities present on the . is only necessary if the message isn't sent in the channel itself. + +capability remove [] [ ...] + If you have the #channel,op capability, this will take from the user currently identified as (or the user to whom maps) the capability in the channel. is only necessary if the message isn't sent in the channel itself. + +capability set [] [ ...] + If you have the #channel,op capability, this will add the channel capability for all users in the channel. is only necessary if the message isn't sent in the channel itself. + +capability setdefault [] {True|False} + If you have the #channel,op capability, this will set the default response to non-power-related (that is, not {op, halfop, voice}) capabilities to be the value you give. is only necessary if the message isn't sent in the channel itself. + +capability unset [] [ ...] + If you have the #channel,op capability, this will unset the channel capability so each user's specific capability or the channel default capability will take precedence. is only necessary if the message isn't sent in the channel itself. + +cycle [] [] + If you have the #channel,op capability, this will cause the bot to "cycle", or PART and then JOIN the channel. is only necessary if the message isn't sent in the channel itself. If is not specified, the default part message specified in supybot.plugins.Channel.partMsg will be used. No part message will be used if neither a cycle reason nor a default part message is given. + +dehalfop [] [ ...] + If you have the #channel,op capability, this will remove half-operator privileges from all the nicks given. If no nicks are given, removes half-operator privileges from the person sending the message. + +deop [] [ ...] + If you have the #channel,op capability, this will remove operator privileges from all the nicks given. If no nicks are given, removes operator privileges from the person sending the message. + +devoice [] [ ...] + If you have the #channel,op capability, this will remove voice from all the nicks given. If no nicks are given, removes voice from the person sending the message. + +disable [] [] [] + If you have the #channel,op capability, this will disable the in . If is provided, will be disabled only for that plugin. If only is provided, all commands in the given plugin will be disabled. is only necessary if the message isn't sent in the channel itself. + +enable [] [] [] + If you have the #channel,op capability, this will enable the in if it has been disabled. If is provided, will be enabled only for that plugin. If only is provided, all commands in the given plugin will be enabled. is only necessary if the message isn't sent in the channel itself. + +halfop [] [ ...] + If you have the #channel,halfop capability, this will give all the s you provide halfops. If you don't provide any s, this will give you halfops. is only necessary if the message isn't sent in the channel itself. + +iban [] [--{exact,nick,user,host}] [] + If you have the #channel,op capability, this will ban for as many seconds as you specify, otherwise (if you specify 0 seconds or don't specify a number of seconds) it will ban the person indefinitely. --exact can be used to specify an exact hostmask. You can combine the exact, nick, user, and host options as you choose. is only necessary if the message isn't sent in the channel itself. + +ignore add [] [] + If you have the #channel,op capability, this will set a persistent ignore on or the hostmask currently associated with . is an optional argument specifying when (in "seconds from now") the ignore will expire; if it isn't given, the ignore will never automatically expire. is only necessary if the message isn't sent in the channel itself. + +ignore list [] + Lists the hostmasks that the bot is ignoring on the given channel. is only necessary if the message isn't sent in the channel itself. + +ignore remove [] + If you have the #channel,op capability, this will remove the persistent ignore on in the channel. is only necessary if the message isn't sent in the channel itself. + +invite [] + If you have the #channel,op capability, this will invite to join . is only necessary if the message isn't sent in the channel itself. + +kban [] [--{exact,nick,user,host}] [] [] + If you have the #channel,op capability, this will kickban for as many seconds as you specify, or else (if you specify 0 seconds or don't specify a number of seconds) it will ban the person indefinitely. --exact bans only the exact hostmask; --nick bans just the nick; --user bans just the user, and --host bans just the host. You can combine these options as you choose. is a reason to give for the kick. is only necessary if the message isn't sent in the channel itself. + +key [] [] + Sets the keyword in to . If is not given, removes the keyword requirement to join . is only necessary if the message isn't sent in the channel itself. + +kick [] [, , ...] [] + Kicks (s) from for . If isn't given, uses the nick of the person making the command as the reason. is only necessary if the message isn't sent in the channel itself. + +limit [] [] + Sets the channel limit to . If is 0, or isn't given, removes the channel limit. is only necessary if the message isn't sent in the channel itself. + +listbans [] + List all bans on the channel. If is not given, it defaults to the current channel. + +lobotomy add [] + If you have the #channel,op capability, this will "lobotomize" the bot, making it silent and unanswering to all requests made in the channel. is only necessary if the message isn't sent in the channel itself. + +lobotomy list takes no arguments + Returns the channels in which this bot is lobotomized. + +lobotomy remove [] + If you have the #channel,op capability, this will unlobotomize the bot, making it respond to requests made in the channel again. is only necessary if the message isn't sent in the channel itself. + +mode [] [ ...] + Sets the mode in to , sending the arguments given. is only necessary if the message isn't sent in the channel itself. + +moderate [] + Sets +m on , making it so only ops and voiced users can send messages to the channel. is only necessary if the message isn't sent in the channel itself. + +nicks [] [--count] + Returns the nicks in . is only necessary if the message isn't sent in the channel itself. Returns only the number of nicks if --count option is provided. + +op [] [ ...] + If you have the #channel,op capability, this will give all the s you provide ops. If you don't provide any s, this will op you. is only necessary if the message isn't sent in the channel itself. + +part [] [] + Tells the bot to part the list of channels you give it. is only necessary if you want the bot to part a channel other than the current channel. If is specified, use it as the part message. Otherwise, the default part message specified in supybot.plugins.Channel.partMsg will be used. No part message will be used if no default is configured. + +unban [] [] + Unbans on . If is not given, unbans any hostmask currently banned on that matches your current hostmask. Especially useful for unbanning yourself when you get unexpectedly (or accidentally) banned from the channel. is only necessary if the message isn't sent in the channel itself. + +unmoderate [] + Sets -m on , making it so everyone can send messages to the channel. is only necessary if the message isn't sent in the channel itself. + +voice [] [ ...] + If you have the #channel,voice capability, this will voice all the s you provide. If you don't provide any s, this will voice you. is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.Channel.alwaysRejoin + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will always try to rejoin a channel whenever it's kicked from the channel. + +supybot.plugins.Channel.nicksInPrivate + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the output of 'nicks' will be sent in private. This prevents mass-highlights of a channel's users, accidental or on purpose. + +supybot.plugins.Channel.partMsg + This config variable defaults to "Limnoria $version", is network-specific, and is channel-specific. + + Determines what part message should be used by default. If the part command is called without a part message, this will be used. If this value is empty, then no part message will be used (they are optional in the IRC protocol). The standard substitutions ($version, $nick, etc.) are all handled appropriately. + +supybot.plugins.Channel.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Channel.rejoinDelay + This config variable defaults to "0", is network-specific, and is channel-specific. + + Determines how many seconds the bot will wait before rejoining a channel if kicked and supybot.plugins.Channel.alwaysRejoin is on. + diff --git a/plugins/ChannelLogger/README.md b/plugins/ChannelLogger/README.md deleted file mode 100644 index b500ba012..000000000 --- a/plugins/ChannelLogger/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin automatically logs the channels where the bot is. diff --git a/plugins/ChannelLogger/README.rst b/plugins/ChannelLogger/README.rst new file mode 100644 index 000000000..b292e0a08 --- /dev/null +++ b/plugins/ChannelLogger/README.rst @@ -0,0 +1,90 @@ +.. _plugin-ChannelLogger: + +Documentation for the ChannelLogger plugin for Supybot +====================================================== + +Purpose +------- +Logs each channel to its own individual logfile. + +Usage +----- +This plugin allows the bot to log channel conversations to disk. + +Configuration +------------- +supybot.plugins.ChannelLogger.directories + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether the bot will partition its channel logs into separate directories based on different criteria. + + supybot.plugins.ChannelLogger.directories.channel + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether the bot will use a channel directory if using directories. + + supybot.plugins.ChannelLogger.directories.network + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether the bot will use a network directory if using directories. + + supybot.plugins.ChannelLogger.directories.timestamp + This config variable defaults to "False", is not network-specific, and is not channel-specific. + + Determines whether the bot will use a timestamp (determined by supybot.plugins.ChannelLogger.directories.timestamp.format) if using directories. + + supybot.plugins.ChannelLogger.directories.timestamp.format + This config variable defaults to "%B", is not network-specific, and is not channel-specific. + + Determines what timestamp format will be used in the directory structure for channel logs if supybot.plugins.ChannelLogger.directories.timestamp is True. + +supybot.plugins.ChannelLogger.enable + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether logging is enabled. + +supybot.plugins.ChannelLogger.filenameTimestamp + This config variable defaults to "%Y-%m-%d", is network-specific, and is channel-specific. + + Determines how to represent the timestamp used for the filename in rotated logs. When this timestamp changes, the old logfiles will be closed and a new one started. The format characters for the timestamp are in the time.strftime docs at python.org. In order for your logs to be rotated, you'll also have to enable supybot.plugins.ChannelLogger.rotateLogs. + +supybot.plugins.ChannelLogger.flushImmediately + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether channel logfiles will be flushed anytime they're written to, rather than being buffered by the operating system. + +supybot.plugins.ChannelLogger.noLogPrefix + This config variable defaults to "[nolog]", is network-specific, and is channel-specific. + + Determines what string a message should be prefixed with in order not to be logged. If you don't want any such prefix, just set it to the empty string. + +supybot.plugins.ChannelLogger.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.ChannelLogger.rewriteRelayed + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will rewrite outgoing relayed messages (eg. from the Relay plugin) to use the original nick instead of the bot's nick. + +supybot.plugins.ChannelLogger.rotateLogs + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will automatically rotate the logs for this channel. The bot will rotate logs when the timestamp for the log changes. The timestamp is set according to the 'filenameTimestamp' configuration variable. + +supybot.plugins.ChannelLogger.showJoinParts + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines wether joins and parts are logged + +supybot.plugins.ChannelLogger.stripFormatting + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether formatting characters (such as bolding, color, etc.) are removed when writing the logs to disk. + +supybot.plugins.ChannelLogger.timestamp + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the logs for this channel are timestamped with the timestamp in supybot.log.timestampFormat. + diff --git a/plugins/ChannelStats/README.md b/plugins/ChannelStats/README.md deleted file mode 100644 index 4018a2d16..000000000 --- a/plugins/ChannelStats/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin keeps stats of the channel and returns them with the command channelstats. diff --git a/plugins/ChannelStats/README.rst b/plugins/ChannelStats/README.rst new file mode 100644 index 000000000..9b69f1513 --- /dev/null +++ b/plugins/ChannelStats/README.rst @@ -0,0 +1,49 @@ +.. _plugin-ChannelStats: + +Documentation for the ChannelStats plugin for Supybot +===================================================== + +Purpose +------- +Silently listens to every message received on a channel and keeps statistics +concerning joins, parts, and various other commands in addition to tracking +statistics about smileys, actions, characters, and words. + +Usage +----- +This plugin keeps stats of the channel and returns them with +the command 'channelstats'. + +Commands +-------- +channelstats [] + Returns the statistics for . is only necessary if the message isn't sent on the channel itself. + +rank [] + Returns the ranking of users according to the given stat expression. Valid variables in the stat expression include 'msgs', 'chars', 'words', 'smileys', 'frowns', 'actions', 'joins', 'parts', 'quits', 'kicks', 'kicked', 'topics', and 'modes'. Any simple mathematical expression involving those variables is permitted. + +stats [] [] + Returns the statistics for on . is only necessary if the message isn't sent on the channel itself. If isn't given, it defaults to the user sending the command. + +Configuration +------------- +supybot.plugins.ChannelStats.frowns + This config variable defaults to ":| :-/ :-\\ :\\ :/ :( :-( :'(", is network-specific, and is channel-specific. + + Determines what words (i.e., pieces of text with no spaces in them) are considered 'frowns' for the purposes of stats-keeping. + +supybot.plugins.ChannelStats.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.ChannelStats.selfStats + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will keep channel statistics on itself, possibly skewing the channel stats (especially in cases where the bot is relaying between channels on a network). + +supybot.plugins.ChannelStats.smileys + This config variable defaults to ":) ;) ;] :-) :-D :D :P :p (= =)", is network-specific, and is channel-specific. + + Determines what words (i.e., pieces of text with no spaces in them) are considered 'smileys' for the purposes of stats-keeping. + diff --git a/plugins/Conditional/README.md b/plugins/Conditional/README.md deleted file mode 100644 index c542ea7a1..000000000 --- a/plugins/Conditional/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Provides a bunch of commands that enables you to run other commands based -on a condition. -Also provides logic operators for writing conditions. - -Useful for bot scripting / nested commands. diff --git a/plugins/Conditional/README.rst b/plugins/Conditional/README.rst new file mode 100644 index 000000000..6ab9c6363 --- /dev/null +++ b/plugins/Conditional/README.rst @@ -0,0 +1,82 @@ +.. _plugin-Conditional: + +Documentation for the Conditional plugin for Supybot +==================================================== + +Purpose +------- +Contains numerous conditional commands (such as 'if', 'and', and 'or'), +which can be used on their own or with another plugin. +Also provides logic operators for writing conditions. + +Useful for bot scripting / nested commands. + +Usage +----- +This plugin provides logic operators and other commands that +enable you to run commands only if a condition is true. Useful for nested +commands and scripting. + +Commands +-------- +cand [ ... ] + Returns true if all conditions supplied evaluate to true. + +ceq + Does a string comparison on and . Returns true if they are equal. + +cerror + Runs and returns true if it raises an error; false otherwise. + +cif + Runs if evaluates to true, runs if it evaluates to false. Use other logical operators defined in this plugin and command nesting to your advantage here. + +cor [ ... ] + Returns true if any one of conditions supplied evaluates to true. + +cxor [ ... ] + Returns true if only one of conditions supplied evaluates to true. + +ge + Does a string comparison on and . Returns true if is greater than or equal to . + +gt + Does a string comparison on and . Returns true if is greater than . + +le + Does a string comparison on and . Returns true if is less than or equal to . + +lt + Does a string comparison on and . Returns true if is less than . + +match [--case-insensitive] + Determines if is a substring of . Returns true if is contained in . Will only match case if --case-insensitive is not given. + +nceq + Does a numeric comparison on and . Returns true if they are equal. + +ne + Does a string comparison on and . Returns true if they are not equal. + +nge + Does a numeric comparison on and . Returns true if is greater than or equal to . + +ngt + Does a numeric comparison on and . Returns true if is greater than . + +nle + Does a numeric comparison on and . Returns true if is less than or equal to . + +nlt + Does a numeric comparison on and . Returns true if is less than . + +nne + Does a numeric comparison on and . Returns true if they are not equal. + +Configuration +------------- +supybot.plugins.Conditional.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Conditional/__init__.py b/plugins/Conditional/__init__.py index 2b1c1e226..9e8a54bee 100644 --- a/plugins/Conditional/__init__.py +++ b/plugins/Conditional/__init__.py @@ -32,6 +32,9 @@ """ Contains numerous conditional commands (such as 'if', 'and', and 'or'), which can be used on their own or with another plugin. +Also provides logic operators for writing conditions. + +Useful for bot scripting / nested commands. """ import supybot diff --git a/plugins/Config/README.rst b/plugins/Config/README.rst new file mode 100644 index 000000000..ec2cff5c5 --- /dev/null +++ b/plugins/Config/README.rst @@ -0,0 +1,65 @@ +.. _plugin-Config: + +Documentation for the Config plugin for Supybot +=============================================== + +Purpose +------- +Handles configuration of the bot while it is running. + +Usage +----- +Provides access to the Supybot configuration. This is +a core Supybot plugin that should not be removed! + +Commands +-------- +channel [] [] [] + If is given, sets the channel configuration variable for to for on the . Otherwise, returns the current channel configuration value of . is only necessary if the message isn't sent in the channel itself. More than one channel may be given at once by separating them with commas. defaults to the current network. + +config [] + If is given, sets the value of to . Otherwise, returns the current value of . You may omit the leading "supybot." in the name if you so choose. + +default + Returns the default value of the configuration variable . + +export + Exports the public variables of your configuration to . If you want to show someone your configuration file, but you don't want that person to be able to see things like passwords, etc., this command will export a "sanitized" configuration file suitable for showing publicly. + +help + Returns the description of the configuration variable . + +list + Returns the configuration variables available under the given configuration . If a variable has values under it, it is preceded by an '@' sign. If a variable is a 'ChannelValue', that is, it can be separately configured for each channel using the 'channel' command in this plugin, it is preceded by an '#' sign. And if a variable is a 'NetworkValue', it is preceded by a ':' sign. + +network [] [] + If is given, sets the network configuration variable for to for . Otherwise, returns the current network configuration value of . defaults to the current network. + +reload takes no arguments + Reloads the various configuration files (user database, channel database, registry, etc.). + +reset channel [] [] + Resets the channel-specific value of variable , so that it will match the network-specific value (or the global one if the latter isn't set). and default to the current network and channel. + +reset network [] [] + Resets the network-specific value of variable , so that it will match the global. defaults to the current network and channel. + +search + Searches for in the current configuration variables. + +searchhelp + Searches for in the help of current configuration variables. + +searchvalues + Searches for in the values of current configuration variables. + +setdefault + Resets the configuration variable to its default value. Use commands 'reset channel' and 'reset network' instead to make a channel- or network- specific value inherit from the global one. + +Configuration +------------- +supybot.plugins.Config.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Ctcp/README.md b/plugins/Ctcp/README.md deleted file mode 100644 index e185967ee..000000000 --- a/plugins/Ctcp/README.md +++ /dev/null @@ -1,5 +0,0 @@ -This plugin gives command `ctcp version` which returns all CTCP version responses to channel. -It also adds CTCP responses to the bot. - -Please note that the command `ctcp version` cannot receive any responses if the channel is -mode +C or similar which prevents CTCP requests to channel. diff --git a/plugins/Ctcp/README.rst b/plugins/Ctcp/README.rst new file mode 100644 index 000000000..5e527bee7 --- /dev/null +++ b/plugins/Ctcp/README.rst @@ -0,0 +1,40 @@ +.. _plugin-Ctcp: + +Documentation for the Ctcp plugin for Supybot +============================================= + +Purpose +------- +Handles standard CTCP responses to PING, TIME, SOURCE, VERSION, USERINFO, +and FINGER. + +Usage +----- +Provides replies to common CTCPs (version, time, etc.), and a command +to fetch version responses from channels. + +Please note that the command `ctcp version` cannot receive any responses if the channel is +mode +C or similar which prevents CTCP requests to channel. + +Commands +-------- +version [] [--nicks] + Sends a CTCP VERSION to , returning the various version strings returned. It waits for 10 seconds before returning the versions received at that point. If --nicks is given, nicks are associated with the version strings; otherwise, only the version strings are given. + +Configuration +------------- +supybot.plugins.Ctcp.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Ctcp.userinfo + This config variable defaults to "", is not network-specific, and is not channel-specific. + + Determines what will be sent when a USERINFO query is received. + +supybot.plugins.Ctcp.versionWait + This config variable defaults to "10", is not network-specific, and is not channel-specific. + + Determines how many seconds the bot will wait after getting a version command (not a CTCP VERSION, but an actual call of the command in this plugin named "version") before replying with the results it has collected. + diff --git a/plugins/Ctcp/plugin.py b/plugins/Ctcp/plugin.py index c05504608..493134aff 100644 --- a/plugins/Ctcp/plugin.py +++ b/plugins/Ctcp/plugin.py @@ -40,8 +40,13 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Ctcp') class Ctcp(callbacks.PluginRegexp): - """Provides replies to common CTCPs (version, time, etc.), and a command - to fetch version responses from channels.""" + """ + Provides replies to common CTCPs (version, time, etc.), and a command + to fetch version responses from channels. + + Please note that the command `ctcp version` cannot receive any responses if the channel is + mode +C or similar which prevents CTCP requests to channel. + """ public = False regexps = ('ctcpPing', 'ctcpVersion', 'ctcpUserinfo', 'ctcpTime', 'ctcpFinger', 'ctcpSource') @@ -106,7 +111,7 @@ class Ctcp(callbacks.PluginRegexp): def ctcpFinger(self, irc, msg, match): "^\x01FINGER\x01$" self.log.info('Received CTCP FINGER from %s', msg.prefix) - self._reply(irc, msg, 'FINGER ' + + self._reply(irc, msg, 'FINGER ' + _('Supybot, the best Python IRC bot in existence!')) def ctcpSource(self, irc, msg, match): diff --git a/plugins/DDG/README.md b/plugins/DDG/README.md deleted file mode 100644 index c41f6696c..000000000 --- a/plugins/DDG/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Provides an interface to DuckDuckGo's web search. - -#### Example - -> <+GLolol> %ddg search eiffel tower - -> <@Atlas> The Eiffel Tower is an iron lattice tower located on the Champ de Mars in Paris. It was named after the engineer Gustave Eiffel, whose company designed and built the tower. - diff --git a/plugins/DDG/README.rst b/plugins/DDG/README.rst new file mode 100644 index 000000000..e9291d1eb --- /dev/null +++ b/plugins/DDG/README.rst @@ -0,0 +1,50 @@ +.. _plugin-DDG: + +Documentation for the DDG plugin for Supybot +============================================ + +Purpose +------- +Searches for results on DuckDuckGo's web search. + +Usage +----- +Searches for results on DuckDuckGo. + +Example:: + + <+GLolol> %ddg search eiffel tower + <@Atlas> The Eiffel Tower is an iron lattice tower located on the Champ de Mars in Paris. It was named after the engineer Gustave Eiffel, whose company designed and built the tower. - + +Commands +-------- +search + Searches for on DuckDuckGo's web search. + +Configuration +------------- +supybot.plugins.DDG.maxResults + This config variable defaults to "4", is network-specific, and is channel-specific. + + Determines the maximum number of results the bot will respond with. + +supybot.plugins.DDG.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.DDG.region + This config variable defaults to "", is network-specific, and is channel-specific. + + Set the DDG search region to return results for the language/country of your choice. E.g. 'us-en' for United States. https://duckduckgo.com/params + +supybot.plugins.DDG.searchFilter + This config variable defaults to "moderate", is network-specific, and is channel-specific. + + Determines what level of search filtering to use by default. 'active' - most filtering, 'moderate' - default filtering, 'off' - no filtering Valid strings: active, moderate, and off. + +supybot.plugins.DDG.showSnippet + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will show a snippet of each resulting link. If False, it will show the title of the link instead. + diff --git a/plugins/DDG/__init__.py b/plugins/DDG/__init__.py index 1731cf9fe..de328438d 100644 --- a/plugins/DDG/__init__.py +++ b/plugins/DDG/__init__.py @@ -29,7 +29,7 @@ ### """ -DDG: Searches for results on DuckDuckGo. +Searches for results on DuckDuckGo's web search. """ import supybot diff --git a/plugins/DDG/plugin.py b/plugins/DDG/plugin.py index 757a6c15f..af70d8b45 100644 --- a/plugins/DDG/plugin.py +++ b/plugins/DDG/plugin.py @@ -50,7 +50,15 @@ from .parser import DDGHTMLParser class DDG(callbacks.Plugin): - """Searches for results on DuckDuckGo.""" + """ + Searches for results on DuckDuckGo. + + Example:: + + <+GLolol> %ddg search eiffel tower + <@Atlas> The Eiffel Tower is an iron lattice tower located on the Champ de Mars in Paris. It was named after the engineer Gustave Eiffel, whose company designed and built the tower. - + + """ threaded = True @staticmethod diff --git a/plugins/Debug/README.md b/plugins/Debug/README.md deleted file mode 100644 index a792386d1..000000000 --- a/plugins/Debug/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This plugin provides debugging abilities for Supybot. It should not be -loaded with a default installation. diff --git a/plugins/Debug/README.rst b/plugins/Debug/README.rst new file mode 100644 index 000000000..5be7c9d84 --- /dev/null +++ b/plugins/Debug/README.rst @@ -0,0 +1,55 @@ +.. _plugin-Debug: + +Documentation for the Debug plugin for Supybot +============================================== + +Purpose +------- +This is for developers debugging their plugins; it provides an eval command +as well as some other useful commands. +It should not be loaded with a default installation. + +Usage +----- +This plugin provides debugging abilities for Supybot. It +should not be loaded with a default installation. + +Commands +-------- +channeldb [] + Returns the result of the channeldb converter. + +collect [] + Does gc collections, returning the number of objects collected each time. defaults to 1. + +environ takes no arguments + Returns the environment of the supybot process. + +eval + Evaluates (which should be a Python expression) and returns its value. If an exception is raised, reports the exception (and logs the traceback to the bot's logfile). + +exec + Execs . Returns success if it didn't raise any exceptions. + +exn + Raises the exception matching . + +sendquote + Sends (not queues) the raw IRC message given. + +settrace [] + Starts tracing function calls to . If is not given, sys.stdout is used. This causes much output. + +simpleeval + Evaluates the given expression. + +unsettrace takes no arguments + Stops tracing function calls on stdout. + +Configuration +------------- +supybot.plugins.Debug.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Debug/__init__.py b/plugins/Debug/__init__.py index 3b501202d..f8c6bf999 100644 --- a/plugins/Debug/__init__.py +++ b/plugins/Debug/__init__.py @@ -30,6 +30,7 @@ """ This is for developers debugging their plugins; it provides an eval command as well as some other useful commands. +It should not be loaded with a default installation. """ import supybot diff --git a/plugins/Dict/README.md b/plugins/Dict/README.md deleted file mode 100644 index 58378c43c..000000000 --- a/plugins/Dict/README.md +++ /dev/null @@ -1,6 +0,0 @@ -This is a simple plugin to allow querying dictionaries for word -definitions. - -In order to use this plugin you must have the following modules -installed: -- dictclient: http://quux.org:70/devel/dictclient diff --git a/plugins/Dict/README.rst b/plugins/Dict/README.rst new file mode 100644 index 000000000..9bfc53a3c --- /dev/null +++ b/plugins/Dict/README.rst @@ -0,0 +1,55 @@ +.. _plugin-Dict: + +Documentation for the Dict plugin for Supybot +============================================= + +Purpose +------- +Commands that use the dictd protocol to define words. + +In order to use this plugin you must have the following modules +installed: + +* dictclient: http://quux.org:70/devel/dictclient + +Usage +----- +This plugin provides a function to look up words from different +dictionaries. + +Commands +-------- +dict [] + Looks up the definition of on the dictd server specified by the supybot.plugins.Dict.server config variable. + +dictionaries takes no arguments + Returns the dictionaries valid for the dict command. + +random takes no arguments + Returns a random valid dictionary. + +synonym [ ...] + Gets a random synonym from the Moby Thesaurus (moby-thesaurus) database. If given many words, gets a random synonym for each of them. Quote phrases to have them treated as one lookup word. + +Configuration +------------- +supybot.plugins.Dict.default + This config variable defaults to "*", is network-specific, and is channel-specific. + + Determines the default dictionary the bot will ask for definitions in. If this value is '*' (without the quotes) the bot will use all dictionaries to define words. + +supybot.plugins.Dict.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Dict.server + This config variable defaults to "dict.org", is not network-specific, and is not channel-specific. + + Determines what server the bot will retrieve definitions from. + +supybot.plugins.Dict.showDictName + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will show which dictionaries responded to a query, if the selected dictionary is '*'. + diff --git a/plugins/Dict/__init__.py b/plugins/Dict/__init__.py index f03080e20..d836167fb 100644 --- a/plugins/Dict/__init__.py +++ b/plugins/Dict/__init__.py @@ -28,7 +28,12 @@ ### """ -Commands that use the dictd protocol to define word. +Commands that use the dictd protocol to define words. + +In order to use this plugin you must have the following modules +installed: + +* dictclient: http://quux.org:70/devel/dictclient """ import supybot diff --git a/plugins/Dunno/README.md b/plugins/Dunno/README.md deleted file mode 100644 index 4bdab2367..000000000 --- a/plugins/Dunno/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This plugin allows using of personalized error messages (Dunnos) in place of invalid command -("Error: qwertyytrewq is not a valid command") error messages. diff --git a/plugins/Dunno/README.rst b/plugins/Dunno/README.rst new file mode 100644 index 000000000..3e8fa33fd --- /dev/null +++ b/plugins/Dunno/README.rst @@ -0,0 +1,52 @@ +.. _plugin-Dunno: + +Documentation for the Dunno plugin for Supybot +============================================== + +Purpose +------- +The Dunno module is used to spice up the reply when given an invalid command +with random 'I dunno'-like responses. If you want something spicier than +' is not a valid command'-like responses, use this plugin. +Like Success does for the 'The operation succeeded.' reply. + +Usage +----- +This plugin was written initially to work with MoobotFactoids, the two +of them to provide a similar-to-moobot-and-blootbot interface for factoids. +Basically, it replaces the standard 'Error: is not a valid command.' +messages with messages kept in a database, able to give more personable +responses. + +Commands +-------- +add [] + Adds to the dunno database for . is only necessary if the message isn't sent in the channel itself. + +change [] + Changes the dunno with id according to the regular expression . is only necessary if the message isn't sent in the channel itself. + +get [] + Gets the dunno with id from the dunno database for . is only necessary if the message isn't sent in the channel itself. + +remove [] + Removes the dunno with id from the dunno database for . is only necessary if the message isn't sent in the channel itself. + +search [] [--{regexp,by} ] [] + Searches for dunnos matching the criteria given. + +stats [] + Returns the number of dunnos in the database for . is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.Dunno.prefixNick + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will prefix the nick of the user giving an invalid command to the "dunno" response. + +supybot.plugins.Dunno.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Dunno/__init__.py b/plugins/Dunno/__init__.py index 72fe4c873..a429d71d5 100644 --- a/plugins/Dunno/__init__.py +++ b/plugins/Dunno/__init__.py @@ -31,6 +31,7 @@ The Dunno module is used to spice up the reply when given an invalid command with random 'I dunno'-like responses. If you want something spicier than ' is not a valid command'-like responses, use this plugin. +Like Success does for the 'The operation succeeded.' reply. """ import supybot diff --git a/plugins/Factoids/README.md b/plugins/Factoids/README.md deleted file mode 100644 index e3be0e6af..000000000 --- a/plugins/Factoids/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This plugin gives the bot ability to show factoids. It can also show information about how many times -factoid has been called. diff --git a/plugins/Factoids/README.rst b/plugins/Factoids/README.rst new file mode 100644 index 000000000..77eb5ffa5 --- /dev/null +++ b/plugins/Factoids/README.rst @@ -0,0 +1,96 @@ +.. _plugin-Factoids: + +Documentation for the Factoids plugin for Supybot +================================================= + +Purpose +------- +Handles 'factoids,' little tidbits of information held in a database and +available on demand via several commands. + +Usage +----- +Provides the ability to show Factoids. + +Commands +-------- +alias [] [] + Adds a new key for factoid associated with . is only necessary if there's more than one factoid associated with . The same action can be accomplished by using the 'learn' function with a new key but an existing (verbatim) factoid content. + +change [] + Changes the factoid # associated with according to . + +forget [] [|*] + Removes a key-fact relationship for key from the factoids database. If there is more than one such relationship for this key, a number is necessary to determine which one should be removed. A * can be used to remove all relationships for . If as a result, the key (factoid) remains without any relationships to a factoid (key), it shall be removed from the database. is only necessary if the message isn't sent in the channel itself. + +info [] + Gives information about the factoid(s) associated with . is only necessary if the message isn't sent in the channel itself. + +learn [] is + Associates with . is only necessary if the message isn't sent on the channel itself. The word 'is' is necessary to separate the key from the value. It can be changed to another word via the learnSeparator registry value. + +lock [] + Locks the factoid(s) associated with so that they cannot be removed or added to. is only necessary if the message isn't sent in the channel itself. + +random [] + Returns random factoids from the database for . is only necessary if the message isn't sent in the channel itself. + +rank [] [--plain] [--alpha] [] + Returns a list of top-ranked factoid keys, sorted by usage count (rank). If is not provided, the default number of factoid keys returned is set by the rankListLength registry value. If --plain option is given, rank numbers and usage counts are not included in output. If --alpha option is given in addition to --plain, keys are sorted alphabetically, instead of by rank. is only necessary if the message isn't sent in the channel itself. + +search [] [--values] [--regexp ] [--author ] [ ...] + Searches the keyspace for keys matching . If --regexp is given, its associated value is taken as a regexp and matched against the keys. If --values is given, search the value space instead of the keyspace. + +unlock [] + Unlocks the factoid(s) associated with so that they can be removed or added to. is only necessary if the message isn't sent in the channel itself. + +whatis [] [--raw] [] + Looks up the value of in the factoid database. If given a number, will return only that exact factoid. If '--raw' option is given, no variable substitution will take place on the factoid. is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.Factoids.format + This config variable defaults to "$value", is network-specific, and is channel-specific. + + Determines the format of the response given when a factoid's value is requested. All the standard substitutes apply, in addition to "$key" for the factoid's key and "$value" for the factoid's value. + +supybot.plugins.Factoids.keepRankInfo + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether we keep updating the usage count for each factoid, for popularity ranking. + +supybot.plugins.Factoids.learnSeparator + This config variable defaults to "is", is network-specific, and is channel-specific. + + Determines what separator must be used in the learn command. Defaults to 'is' -- learn is . Users might want to change this to something else, so it's configurable. + +supybot.plugins.Factoids.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Factoids.rankListLength + This config variable defaults to "20", is network-specific, and is channel-specific. + + Determines the number of factoid keys returned by the factrank command. + +supybot.plugins.Factoids.replyApproximateSearchKeys + This config variable defaults to "True", is network-specific, and is channel-specific. + + If you try to look up a nonexistent factoid, this setting make the bot try to find some possible matching keys through several approximate matching algorithms and return a list of matching keys, before giving up. + +supybot.plugins.Factoids.replyWhenInvalidCommand + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will reply to invalid commands by searching for a factoid; basically making the whatis unnecessary when you want all factoids for a given key. + +supybot.plugins.Factoids.requireVoice + This config variable defaults to "False", is network-specific, and is channel-specific. + + Only allows a user with voice or above on a channel to use the 'learn' and 'forget' commands. + +supybot.plugins.Factoids.showFactoidIfOnlyOneMatch + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will reply with the single matching factoid if only one factoid matches when using the search command. + diff --git a/plugins/Fediverse/README.md b/plugins/Fediverse/README.md deleted file mode 100644 index 5fa60a4bd..000000000 --- a/plugins/Fediverse/README.md +++ /dev/null @@ -1,22 +0,0 @@ -Fetches information from ActivityPub servers. - -# Enabling Secure Fetch - -The default configuration works with most ActivityPub servers, but not -all of them, because they require an HTTP Signature to fetch profiles -and statuses. - -Because of how HTTP Signatures work, you need to add some configuration -for Limnoria to support it. - -First, you should set `supybot.servers.http.port` to a port you want -your bot to listen on (by default it's 8080). If there are already -plugins using it (eg. if Fediverse is already running), you should -either unload all of them and load them back, or restart your bot. - -Then, you must configure a reverse-proxy in front of your bot (eg. nginx), -and it must support HTTPS. - -Finally, set `supybot.servers.http.publicUrl` to the public URL of this -server (when opening this URL in your browser, it should show a page with -a title like "Supybot web server index"). diff --git a/plugins/Fediverse/README.rst b/plugins/Fediverse/README.rst new file mode 100644 index 000000000..86d5e83ac --- /dev/null +++ b/plugins/Fediverse/README.rst @@ -0,0 +1,56 @@ +.. _plugin-Fediverse: + +Documentation for the Fediverse plugin for Supybot +================================================== + +Purpose +------- +Fetches information from ActivityPub servers. + +Enabling Secure Fetch +--------------------- + +The default configuration works with most ActivityPub servers, but not +all of them, because they require an HTTP Signature to fetch profiles +and statuses. + +Because of how HTTP Signatures work, you need to add some configuration +for Limnoria to support it. + +First, you should set ``supybot.servers.http.port`` to a port you want +your bot to listen on (by default it's 8080). If there are already +plugins using it (eg. if Fediverse is already running), you should +either unload all of them and load them back, or restart your bot. + +Then, you must configure a reverse-proxy in front of your bot (eg. nginx), +and it must support HTTPS. + +Finally, set ``supybot.servers.http.publicUrl`` to the public URL of this +server (when opening this URL in your browser, it should show a page with +a title like "Supybot web server index"). + +Usage +----- +Fetches information from ActivityPub servers. + +Commands +-------- +featured <@user@instance> + Returnes the featured statuses of @user@instance (aka. pinned toots). + +profile <@user@instance> + Returns generic information on the account @user@instance. + +status + Shows the content of the status at . + +statuses <@user@instance> + Returned the last statuses of @user@instance. + +Configuration +------------- +supybot.plugins.Fediverse.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Fediverse/__init__.py b/plugins/Fediverse/__init__.py index 61e737803..4cc02a74b 100644 --- a/plugins/Fediverse/__init__.py +++ b/plugins/Fediverse/__init__.py @@ -29,7 +29,29 @@ ### """ -Fediverse: Fetches information from ActivityPub servers. +Fetches information from ActivityPub servers. + +Enabling Secure Fetch +--------------------- + +The default configuration works with most ActivityPub servers, but not +all of them, because they require an HTTP Signature to fetch profiles +and statuses. + +Because of how HTTP Signatures work, you need to add some configuration +for Limnoria to support it. + +First, you should set ``supybot.servers.http.port`` to a port you want +your bot to listen on (by default it's 8080). If there are already +plugins using it (eg. if Fediverse is already running), you should +either unload all of them and load them back, or restart your bot. + +Then, you must configure a reverse-proxy in front of your bot (eg. nginx), +and it must support HTTPS. + +Finally, set ``supybot.servers.http.publicUrl`` to the public URL of this +server (when opening this URL in your browser, it should show a page with +a title like "Supybot web server index"). """ import sys diff --git a/plugins/Filter/README.md b/plugins/Filter/README.md deleted file mode 100644 index 8c4b72b25..000000000 --- a/plugins/Filter/README.md +++ /dev/null @@ -1,5 +0,0 @@ -This plugin offers several commands which transform text in some way. -It also provides the capability of using such commands to 'filter' -the output of the bot -- for instance, you could make everything the bot says be -in leetspeak, or Morse code, or any number of other kinds of filters. -Not very useful, but definitely quite fun :) diff --git a/plugins/Filter/README.rst b/plugins/Filter/README.rst new file mode 100644 index 000000000..dd33baba3 --- /dev/null +++ b/plugins/Filter/README.rst @@ -0,0 +1,117 @@ +.. _plugin-Filter: + +Documentation for the Filter plugin for Supybot +=============================================== + +Purpose +------- +Provides numerous filters, and a command (outfilter) to set them as filters on +the output of the bot. +For instance, you could make everything the bot says be +in leetspeak, or Morse code, or any number of other kinds of filters. +Not very useful, but definitely quite fun :) + +See also the :ref:`Format plugin ` for format manipulation +commands. + +Usage +----- +This plugin offers several commands which transform text in some way. +It also provides the capability of using such commands to 'filter' the +output of the bot -- for instance, you could make everything the bot says +be in leetspeak, or Morse code, or any number of other kinds of filters. +Not very useful, but definitely quite fun :) + +Commands +-------- +aol + Returns as if an AOL user had said it. + +binary + Returns the binary representation of . + +caps + EVERYONE LOVES CAPS LOCK. + +capwords + Capitalises the first letter of each word. + +colorize + Returns with each character randomly colorized. + +gnu + Returns as GNU/RMS would say it. + +hebrew + Removes all the vowels from . (If you're curious why this is named 'hebrew' it's because I (jemfinch) thought of it in Hebrew class, and printed Hebrew often elides the vowels.) + +hexlify + Returns a hexstring from the given string; a hexstring is a string composed of the hexadecimal value of each character in the string + +jeffk + Returns as if JeffK had said it himself. + +leet + Returns the l33tspeak version of + +morse + Gives the Morse code equivalent of a given string. + +outfilter [] [] + Sets the outFilter of this plugin to be . If no command is given, unsets the outFilter. is only necessary if the message isn't sent in the channel itself. + +rainbow + Returns colorized like a rainbow. + +reverse + Reverses . + +rot13 + Rotates 13 characters to the right in the alphabet. Rot13 is commonly used for text that simply needs to be hidden from inadvertent reading by roaming eyes, since it's easily reversible. + +scramble + Replies with a string where each word is scrambled; i.e., each internal letter (that is, all letters but the first and last) are shuffled. + +shrink + Returns with each word longer than supybot.plugins.Filter.shrink.minimum being shrunken (i.e., like "internationalization" becomes "i18n"). + +spellit + Returns , phonetically spelled out. + +squish + Removes all the spaces from . + +stripcolor + Returns stripped of all color codes. + +supa1337 + Replies with an especially k-rad translation of . + +unbinary + Returns the character representation of binary . Assumes ASCII, 8 digits per character. + +undup + Returns , with all consecutive duplicated letters removed. + +unhexlify + Returns the string corresponding to . Obviously, must be a string of hexadecimal digits. + +uniud + Returns rotated 180 degrees. Only really works for ASCII printable characters. + +unmorse + Does the reverse of the morse command. + +uwu + Returns in uwu-speak. + +vowelrot + Returns with vowels rotated + +Configuration +------------- +supybot.plugins.Filter.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Filter/__init__.py b/plugins/Filter/__init__.py index a470e3bfd..b303cebb3 100644 --- a/plugins/Filter/__init__.py +++ b/plugins/Filter/__init__.py @@ -30,6 +30,12 @@ """ Provides numerous filters, and a command (outfilter) to set them as filters on the output of the bot. +For instance, you could make everything the bot says be +in leetspeak, or Morse code, or any number of other kinds of filters. +Not very useful, but definitely quite fun :) + +See also the :ref:`Format plugin ` for format manipulation +commands. """ import supybot diff --git a/plugins/Format/README.md b/plugins/Format/README.md deleted file mode 100644 index 52b9c6f7c..000000000 --- a/plugins/Format/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This plugin provides commands which change the output format of the bot. For example you can make -the bot to bold something. diff --git a/plugins/Format/README.rst b/plugins/Format/README.rst new file mode 100644 index 000000000..589916c2f --- /dev/null +++ b/plugins/Format/README.rst @@ -0,0 +1,77 @@ +.. _plugin-Format: + +Documentation for the Format plugin for Supybot +=============================================== + +Purpose +------- +Provides simple commands for formatting text on IRC (like bold), +and to change the output of the bot for a particular command. +See also the :ref:`Filter plugin ` to configure +the output format for all commands. + +Usage +----- +Provides some commands for formatting text, such as making text bold or +capitalized. + +Commands +-------- +bold + Returns bolded. + +capitalize + Returns capitalized. + +color [] + Returns with foreground color and background color (if given) + +concat + Concatenates two strings. Do keep in mind that this is *not* the same thing as join "", since if contains spaces, they won't be removed by concat. + +cut + Cuts down to by chopping off the rightmost characters in excess of . If is a negative number, it chops that many characters off the end of . + +field + Returns the th space-separated field of . I.e., if text is "foo bar baz" and is 2, "bar" is returned. + +format [ ...] + Expands a Python-style format string using the remaining args. Just be sure always to use %s, not %d or %f or whatever, because all the args are strings. + +join [ ...] + Joins all the arguments together with . + +lower + Returns lowercased. + +replace + Replaces all non-overlapping occurrences of with in . + +repr + Returns surrounded by double quotes. + +reverse + Returns in reverse-video. + +stripformatting + Strips bold, underline, and colors from . + +title + Returns titlecased. + +translate + Replaces with in . The first and second arguments must necessarily be the same length. + +underline + Returns underlined. + +upper + Returns uppercased. + +Configuration +------------- +supybot.plugins.Format.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Format/__init__.py b/plugins/Format/__init__.py index 7367efc4e..e2ad11cd9 100644 --- a/plugins/Format/__init__.py +++ b/plugins/Format/__init__.py @@ -28,7 +28,10 @@ ### """ -Provides simple commands for formatting text on IRC. +Provides simple commands for formatting text on IRC (like bold), +and to change the output of the bot for a particular command. +See also the :ref:`Filter plugin ` to configure +the output format for all commands. """ import supybot diff --git a/plugins/GPG/README.md b/plugins/GPG/README.md deleted file mode 100644 index c72b4615d..000000000 --- a/plugins/GPG/README.md +++ /dev/null @@ -1 +0,0 @@ -Provides authentication based on GPG keys. diff --git a/plugins/GPG/README.rst b/plugins/GPG/README.rst new file mode 100644 index 000000000..dfa242f37 --- /dev/null +++ b/plugins/GPG/README.rst @@ -0,0 +1,37 @@ +.. _plugin-GPG: + +Documentation for the GPG plugin for Supybot +============================================ + +Purpose +------- +GPG: Provides authentication based on GPG keys. + +Usage +----- +Provides authentication based on GPG keys. + +Commands +-------- +key add + Add a GPG key to your account. + +key list takes no arguments + List your GPG keys. + +key remove + Remove a GPG key from your account. + +signing auth + Check the GPG signature at the and authenticates you if the key used is associated to a user. + +signing gettoken takes no arguments + Send you a token that you'll have to sign with your key. + +Configuration +------------- +supybot.plugins.GPG.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Games/README.md b/plugins/Games/README.md deleted file mode 100644 index 6729eb5a0..000000000 --- a/plugins/Games/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This plugin provides some fun games like (Russian) roulette, 8ball, monologue which tells you -how many lines you have spoken without anyone interrupting you, coin and dice. diff --git a/plugins/Games/README.rst b/plugins/Games/README.rst new file mode 100644 index 000000000..758813960 --- /dev/null +++ b/plugins/Games/README.rst @@ -0,0 +1,40 @@ +.. _plugin-Games: + +Documentation for the Games plugin for Supybot +============================================== + +Purpose +------- +This plugin provides some fun games like (Russian) roulette, 8ball, monologue +which tells you how many lines you have spoken without anyone interrupting +you, coin and dice. + +Usage +----- +This plugin provides some small games like (Russian) roulette, +eightball, monologue, coin and dice. + +Commands +-------- +coin takes no arguments + Flips a coin and returns the result. + +dice d + Rolls a die with number of sides times. For example, 2d6 will roll 2 six-sided dice; 10d10 will roll 10 ten-sided dice. + +eightball [] + Ask a question and the answer shall be provided. + +monologue [] + Returns the number of consecutive lines you've sent in without being interrupted by someone else (i.e. how long your current 'monologue' is). is only necessary if the message isn't sent in the channel itself. + +roulette [spin] + Fires the revolver. If the bullet was in the chamber, you're dead. Tell me to spin the chambers and I will. + +Configuration +------------- +supybot.plugins.Games.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Games/__init__.py b/plugins/Games/__init__.py index b6539076f..d056c155a 100644 --- a/plugins/Games/__init__.py +++ b/plugins/Games/__init__.py @@ -28,7 +28,9 @@ ### """ -Provides various game-related commands. +This plugin provides some fun games like (Russian) roulette, 8ball, monologue +which tells you how many lines you have spoken without anyone interrupting +you, coin and dice. """ import supybot diff --git a/plugins/Google/README.md b/plugins/Google/README.md deleted file mode 100644 index ba0c3d285..000000000 --- a/plugins/Google/README.md +++ /dev/null @@ -1,29 +0,0 @@ -This is a simple plugin to provide access to the Google services we all know -and love from our favorite IRC bot. - -Commands: cache, calc, fight, google, lucky, phonebook, and translate - -Basic usage ------------ - -1. google - - Searches for a string and gives you 3 results from Google search - >!google something - -2. lucky - - Return the first result (Google's "I'm Feeling Lucky" search) - >!lucky something - -3. calc - - Does mathematic calculations - >!calc 5+4 - -4. translate - - Translates a string - >!translate en ar test - -Check: [Supported language codes](https://cloud.google.com/translate/v2/using_rest#language-params) diff --git a/plugins/Google/README.rst b/plugins/Google/README.rst new file mode 100644 index 000000000..946b1ca9b --- /dev/null +++ b/plugins/Google/README.rst @@ -0,0 +1,113 @@ +.. _plugin-Google: + +Documentation for the Google plugin for Supybot +=============================================== + +Purpose +------- +Accesses Google for various things. + +Usage +----- +This is a simple plugin to provide access to the Google services we +all know and love from our favorite IRC bot. + +1. google + + Searches for a string and gives you 3 results from Google search + ``!google something`` + +2. lucky + + Return the first result (Google's "I'm Feeling Lucky" search) + ``!lucky something`` + +3. calc + + Does mathematic calculations + ``!calc 5+4`` + +4. translate + + Translates a string + ``!translate en ar test`` + +Check: `Supported language codes`_ + +.. _Supported language codes: ` + +Commands +-------- +cache + Returns a link to the cached version of if it is available. + +calc + Uses Google's calculator to calculate the value of . + +fight [ ...] + Returns the results of each search, in order, from greatest number of results to least. + +google [--{filter,language} ] + Searches google.com for the given string. As many results as can fit are included. --language accepts a language abbreviation; --filter accepts a filtering level ('active', 'moderate', 'off'). + +lucky [--snippet] + Does a google search, but only returns the first result. If option --snippet is given, returns also the page text snippet. + +phonebook + Looks up on Google. + +translate [to] + Returns translated from into . and take language codes (not language names), which are listed here: https://cloud.google.com/translate/docs/languages + +Configuration +------------- +supybot.plugins.Google.baseUrl + This config variable defaults to "google.com", is network-specific, and is channel-specific. + + Determines the base URL used for requests. + +supybot.plugins.Google.bold + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether results are bolded. + +supybot.plugins.Google.colorfulFilter + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the word 'google' in the bot's output will be made colorful (like Google's logo). + +supybot.plugins.Google.defaultLanguage + This config variable defaults to "lang_en", is network-specific, and is channel-specific. + + Determines what default language is used in searches. If left empty, no specific language will be requested. Valid strings: lang_af, lang_sq, lang_am, lang_ar, lang_hy, lang_az, lang_eu, lang_be, lang_bn, lang_bg, lang_my, lang_ca, lang_zh, lang_zh-CN, lang_zh-TW, lang_hr, lang_cs, lang_da, lang_dv, lang_nl, lang_en, lang_eo, lang_et, lang_tl, lang_fi, lang_fr, lang_gl, lang_ka, lang_de, lang_el, lang_gu, lang_iw, lang_hi, lang_hu, lang_is, lang_id, lang_iu, lang_it, lang_ja, lang_kn, lang_kk, lang_km, lang_ko, lang_ku, lang_ky, lang_lo, lang_lv, lang_lt, lang_mk, lang_ms, lang_ml, lang_mt, lang_mr, lang_mn, lang_ne, lang_no, lang_or, lang_ps, lang_fa, lang_pl, lang_pt-PT, lang_pa, lang_ro, lang_ru, lang_sa, lang_sr, lang_sd, lang_si, lang_sk, lang_sl, lang_es, lang_sv, lang_tg, lang_ta, lang_tl, lang_te, lang_th, lang_bo, lang_tr, lang_uk, lang_ur, lang_uz, lang_ug, lang_vi, and lang_auto. + +supybot.plugins.Google.maximumResults + This config variable defaults to "3", is network-specific, and is channel-specific. + + Determines the maximum number of results returned from the google command. + +supybot.plugins.Google.oneToOne + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether results are sent in different lines or all in the same one. + +supybot.plugins.Google.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Google.referer + This config variable defaults to "", is not network-specific, and is not channel-specific. + + Determines the URL that will be sent to Google for the Referer field of the search requests. If this value is empty, a Referer will be generated in the following format: http://$server/$botName + +supybot.plugins.Google.searchFilter + This config variable defaults to "moderate", is network-specific, and is channel-specific. + + Determines what level of search filtering to use by default. 'active' - most filtering, 'moderate' - default filtering, 'off' - no filtering Valid strings: active, moderate, and off. + +supybot.plugins.Google.searchSnarfer + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the search snarfer is enabled. If so, messages (even unaddressed ones) beginning with the word 'google' will result in the first URL Google returns being sent to the channel. + diff --git a/plugins/Google/plugin.py b/plugins/Google/plugin.py index 0edec6136..6bc3d3bd7 100644 --- a/plugins/Google/plugin.py +++ b/plugins/Google/plugin.py @@ -46,8 +46,34 @@ _ = PluginInternationalization('Google') from .parser import GoogleHTMLParser class Google(callbacks.PluginRegexp): - """This is a simple plugin to provide access to the Google services we - all know and love from our favorite IRC bot.""" + """ + This is a simple plugin to provide access to the Google services we + all know and love from our favorite IRC bot. + + 1. google + + Searches for a string and gives you 3 results from Google search + ``!google something`` + + 2. lucky + + Return the first result (Google's "I'm Feeling Lucky" search) + ``!lucky something`` + + 3. calc + + Does mathematic calculations + ``!calc 5+4`` + + 4. translate + + Translates a string + ``!translate en ar test`` + + Check: `Supported language codes`_ + + .. _Supported language codes: ` + """ threaded = True callBefore = ['Web'] regexps = ['googleSnarfer'] diff --git a/plugins/Hashes/README.md b/plugins/Hashes/README.md deleted file mode 100644 index 77a70957c..000000000 --- a/plugins/Hashes/README.md +++ /dev/null @@ -1 +0,0 @@ -Provides hash and encryption related commands. diff --git a/plugins/Hashes/README.rst b/plugins/Hashes/README.rst new file mode 100644 index 000000000..1ca6aa3c1 --- /dev/null +++ b/plugins/Hashes/README.rst @@ -0,0 +1,40 @@ +.. _plugin-Hashes: + +Documentation for the Hashes plugin for Supybot +=============================================== + +Purpose +------- +Provides various hash- and encryption-related commands. + +Usage +----- +Provides hash or encryption related commands + +Commands +-------- +algorithms + Returns the list of available algorithms. + +md5 + Returns the md5 hash of a given string. + +mkhash + Returns TEXT after it has been hashed with ALGORITHM. See the 'algorithms' command in this plugin to return the algorithms available on this system. + +sha + Returns the SHA1 hash of a given string. + +sha256 + Returns a SHA256 hash of the given string. + +sha512 + Returns a SHA512 hash of the given string. + +Configuration +------------- +supybot.plugins.Hashes.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Hashes/__init__.py b/plugins/Hashes/__init__.py index da342c05c..55032e29e 100644 --- a/plugins/Hashes/__init__.py +++ b/plugins/Hashes/__init__.py @@ -28,7 +28,7 @@ ### """ -Provides various hash-related commands. +Provides various hash- and encryption-related commands. """ import supybot diff --git a/plugins/Herald/README.md b/plugins/Herald/README.md deleted file mode 100644 index 305905e5a..000000000 --- a/plugins/Herald/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This plugin allows you to set welcome messages (heralds) to people who are recognized by the bot -when they join a channel. diff --git a/plugins/Herald/README.rst b/plugins/Herald/README.rst new file mode 100644 index 000000000..6587ed081 --- /dev/null +++ b/plugins/Herald/README.rst @@ -0,0 +1,79 @@ +.. _plugin-Herald: + +Documentation for the Herald plugin for Supybot +=============================================== + +Purpose +------- +Greets users who join the channel with a recognized hostmask with a nice +little greeting. + +Usage +----- +This plugin allows you to set welcome messages (heralds) to people who +are recognized by the bot when they join a channel. + +Commands +-------- +add [] + Sets the herald message for (or the user is currently identified or recognized as) to . is only necessary if the message isn't sent in the channel itself. + +change [] [] + Changes the herald message for , or the user is currently identified or recognized as, according to . If is not given, defaults to the calling user. is only necessary if the message isn't sent in the channel itself. + +default [] [--remove|] + If is given, sets the default herald to . A of "" will remove the default herald. If is not given, returns the current default herald. is only necessary if the message isn't sent in the channel itself. + +get [] [] + Returns the current herald message for (or the user is currently identified or recognized as). If is not given, defaults to the user giving the command. is only necessary if the message isn't sent in the channel itself. + +remove [] [] + Removes the herald message set for , or the user is currently identified or recognized as. If is not given, defaults to the user giving the command. is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.Herald.default + This config variable defaults to "", is network-specific, and is channel-specific. + + Sets the default herald to use. If a user has a personal herald specified, that will be used instead. If set to the empty string, the default herald will be disabled. + + supybot.plugins.Herald.default.notice + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the default herald will be sent as a NOTICE instead of a PRIVMSG. + + supybot.plugins.Herald.default.public + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the default herald will be sent publicly. + +supybot.plugins.Herald.heralding + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether messages will be sent to the channel when a recognized user joins; basically enables or disables the plugin. + +supybot.plugins.Herald.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Herald.requireCapability + This config variable defaults to "", is not network-specific, and is not channel-specific. + + Determines what capability (if any) is required to add/change/remove the herald of another user. + +supybot.plugins.Herald.throttle + This config variable defaults to "600", is network-specific, and is channel-specific. + + Determines the minimum number of seconds between heralds. + + supybot.plugins.Herald.throttle.afterPart + This config variable defaults to "0", is network-specific, and is channel-specific. + + Determines the minimum number of seconds after parting that the bot will not herald the person when they rejoin. + + supybot.plugins.Herald.throttle.afterSplit + This config variable defaults to "60", is network-specific, and is channel-specific. + + Determines the minimum number of seconds after a netsplit that the bot will not herald the users that split. + diff --git a/plugins/Internet/README.md b/plugins/Internet/README.md deleted file mode 100644 index 6f5dcf06c..000000000 --- a/plugins/Internet/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This plugin provides commands to transform domains into IP addresses and IP addresses to domains. -It can also search WHOIS information and return hexips. diff --git a/plugins/Internet/README.rst b/plugins/Internet/README.rst new file mode 100644 index 000000000..afbd8d586 --- /dev/null +++ b/plugins/Internet/README.rst @@ -0,0 +1,33 @@ +.. _plugin-Internet: + +Documentation for the Internet plugin for Supybot +================================================= + +Purpose +------- +This plugin provides commands to transform domains into IP addresses and IP addresses to domains. +It can also search WHOIS information and return hexips. + +Usage +----- +Provides commands to query DNS, search WHOIS databases, +and convert IPs to hex. + +Commands +-------- +dns + Returns the ip of or the reverse DNS hostname of . + +hexip + Returns the hexadecimal IP for that IP. + +whois + Returns WHOIS information on the registration of . + +Configuration +------------- +supybot.plugins.Internet.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Internet/__init__.py b/plugins/Internet/__init__.py index 6789c781d..9b9bea12b 100644 --- a/plugins/Internet/__init__.py +++ b/plugins/Internet/__init__.py @@ -28,7 +28,8 @@ ### """ -Provides some internet-related commands. +This plugin provides commands to transform domains into IP addresses and IP addresses to domains. +It can also search WHOIS information and return hexips. """ import supybot diff --git a/plugins/Karma/README.md b/plugins/Karma/README.md deleted file mode 100644 index 7b7c8140b..000000000 --- a/plugins/Karma/README.md +++ /dev/null @@ -1,7 +0,0 @@ -This plugins tracks karma for users and things in channels. - -If `config plugins.karma.allowUnaddressedKarma` is set to `True` (default since 2014.05.07), saying `boats++` will give 1 karma to `boats`, and `ships--` will subtract 1 karma from `ships`. - -However, if you use this in a sentence, like `That deserves a ++. Kevin++`, 1 karma will be added to `That deserves a ++. Kevin`, so you should only add or subtract karma in a line that doesn't have anything else in it. Alternatively, you can restrict karma tracking to nicks in the current channel by setting `config plugins.Karma.onlyNicks` to `True`. - -If `config plugins.karma.allowUnaddressedKarma` is set to `False`, you must address the bot with nick or prefix to add or subtract karma. diff --git a/plugins/Karma/README.rst b/plugins/Karma/README.rst new file mode 100644 index 000000000..223a16dd1 --- /dev/null +++ b/plugins/Karma/README.rst @@ -0,0 +1,95 @@ +.. _plugin-Karma: + +Documentation for the Karma plugin for Supybot +============================================== + +Purpose +------- +Plugin for keeping track of Karma for users and things in a channel. + +Usage +----- +Provides a simple tracker for setting Karma (thing++, thing--). +If ``config plugins.karma.allowUnaddressedKarma`` is set to ``True`` +(default since 2014.05.07), saying `boats++` will give 1 karma +to ``boats``, and ``ships--`` will subtract 1 karma from ``ships``. + +However, if you use this in a sentence, like +``That deserves a ++. Kevin++``, 1 karma will be added to +``That deserves a ++. Kevin``, so you should only add or subtract karma +in a line that doesn't have anything else in it. +Alternatively, you can restrict karma tracking to nicks in the current +channel by setting `config plugins.Karma.onlyNicks` to ``True``. + +If ``config plugins.karma.allowUnaddressedKarma` is set to `False``, +you must address the bot with nick or prefix to add or subtract karma. + +Commands +-------- +clear [] [] + Resets the karma of to 0. If is not given, resets everything. + +dump [] + Dumps the Karma database for to in the bot's data directory. is only necessary if the message isn't sent in the channel itself. + +karma [] [ ...] + Returns the karma of . If is not given, returns the top N karmas, where N is determined by the config variable supybot.plugins.Karma.rankingDisplay. If one is given, returns the details of its karma; if more than one is given, returns the total karma of each of the things. is only necessary if the message isn't sent on the channel itself. + +load [] + Loads the Karma database for from in the bot's data directory. is only necessary if the message isn't sent in the channel itself. + +most [] {increased,decreased,active} + Returns the most increased, the most decreased, or the most active (the sum of increased and decreased) karma things. is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.Karma.allowSelfRating + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether users can adjust the karma of their nick. + +supybot.plugins.Karma.allowUnaddressedKarma + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will increase/decrease karma without being addressed. + +supybot.plugins.Karma.decrementChars + This config variable defaults to "--", is network-specific, and is channel-specific. + + A space separated list of characters to decrease karma. + +supybot.plugins.Karma.incrementChars + This config variable defaults to "++", is network-specific, and is channel-specific. + + A space separated list of characters to increase karma. + +supybot.plugins.Karma.mostDisplay + This config variable defaults to "25", is network-specific, and is channel-specific. + + Determines how many karma things are shown when the most command is called. + +supybot.plugins.Karma.onlyNicks + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will only increase/decrease karma for nicks in the current channel. + +supybot.plugins.Karma.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Karma.rankingDisplay + This config variable defaults to "3", is network-specific, and is channel-specific. + + Determines how many highest/lowest karma things are shown when karma is called with no arguments. + +supybot.plugins.Karma.response + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will reply with a success message when something's karma is increased or decreased. + +supybot.plugins.Karma.simpleOutput + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will output shorter versions of the karma output when requesting a single thing's karma. + diff --git a/plugins/Karma/__init__.py b/plugins/Karma/__init__.py index 8f9f3318d..351aea456 100644 --- a/plugins/Karma/__init__.py +++ b/plugins/Karma/__init__.py @@ -28,7 +28,7 @@ ### """ -Plugin for handling Karma stuff for a channel. +Plugin for keeping track of Karma for users and things in a channel. """ import supybot diff --git a/plugins/Karma/plugin.py b/plugins/Karma/plugin.py index aa08287cf..6f71cc2a3 100644 --- a/plugins/Karma/plugin.py +++ b/plugins/Karma/plugin.py @@ -225,7 +225,22 @@ KarmaDB = plugins.DB('Karma', {'sqlite3': SqliteKarmaDB}) class Karma(callbacks.Plugin): - """Provides a simple tracker for setting Karma (thing++, thing--).""" + """ + Provides a simple tracker for setting Karma (thing++, thing--). + If ``config plugins.karma.allowUnaddressedKarma`` is set to ``True`` + (default since 2014.05.07), saying `boats++` will give 1 karma + to ``boats``, and ``ships--`` will subtract 1 karma from ``ships``. + + However, if you use this in a sentence, like + ``That deserves a ++. Kevin++``, 1 karma will be added to + ``That deserves a ++. Kevin``, so you should only add or subtract karma + in a line that doesn't have anything else in it. + Alternatively, you can restrict karma tracking to nicks in the current + channel by setting `config plugins.Karma.onlyNicks` to ``True``. + + If ``config plugins.karma.allowUnaddressedKarma` is set to `False``, + you must address the bot with nick or prefix to add or subtract karma. + """ callBefore = ('Factoids', 'MoobotFactoids', 'Infobot') def __init__(self, irc): self.__parent = super(Karma, self) diff --git a/plugins/Lart/README.md b/plugins/Lart/README.md deleted file mode 100644 index 18ff6a021..000000000 --- a/plugins/Lart/README.md +++ /dev/null @@ -1,6 +0,0 @@ -Allows the use of the Luser Attitude Readjustment Tool on someone or something. - -Example: -* If you add `slaps $who`. -* And Someone says `@lart ChanServ`. -* `* bot slaps ChanServ`. diff --git a/plugins/Lart/README.rst b/plugins/Lart/README.rst new file mode 100644 index 000000000..fbb10be92 --- /dev/null +++ b/plugins/Lart/README.rst @@ -0,0 +1,56 @@ +.. _plugin-Lart: + +Documentation for the Lart plugin for Supybot +============================================= + +Purpose +------- +This plugin keeps a database of larts (Luser Attitude Readjustment Tool), +and larts with it. + +Usage +----- +Provides an implementation of the Luser Attitude Readjustment Tool +for users. + +Example: + +* If you add ``slaps $who``. +* And Someone says ``@lart ChanServ``. +* ``* bot slaps ChanServ``. + +Commands +-------- +add [] + Adds to the lart database for . is only necessary if the message isn't sent in the channel itself. + +change [] + Changes the lart with id according to the regular expression . is only necessary if the message isn't sent in the channel itself. + +get [] + Gets the lart with id from the lart database for . is only necessary if the message isn't sent in the channel itself. + +lart [] [] [for ] + Uses the Luser Attitude Readjustment Tool on (for , if given). If is given, uses that specific lart. is only necessary if the message isn't sent in the channel itself. + +remove [] + Removes the lart with id from the lart database for . is only necessary if the message isn't sent in the channel itself. + +search [] [--{regexp,by} ] [] + Searches for larts matching the criteria given. + +stats [] + Returns the number of larts in the database for . is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.Lart.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Lart.showIds + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will show the ids of a lart when the lart is given. + diff --git a/plugins/Lart/__init__.py b/plugins/Lart/__init__.py index 117d37a8c..098e47e5a 100644 --- a/plugins/Lart/__init__.py +++ b/plugins/Lart/__init__.py @@ -28,7 +28,8 @@ ### """ -This plugin keeps a database of larts, and larts with it. +This plugin keeps a database of larts (Luser Attitude Readjustment Tool), +and larts with it. """ import supybot diff --git a/plugins/Lart/plugin.py b/plugins/Lart/plugin.py index b7660aa06..a1c423339 100644 --- a/plugins/Lart/plugin.py +++ b/plugins/Lart/plugin.py @@ -36,8 +36,16 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Lart') class Lart(plugins.ChannelIdDatabasePlugin): - """Provides an implementation of the Luser Attitude Readjustment Tool - for users.""" + """ + Provides an implementation of the Luser Attitude Readjustment Tool + for users. + + Example: + + * If you add ``slaps $who``. + * And Someone says ``@lart ChanServ``. + * ``* bot slaps ChanServ``. + """ _meRe = re.compile(r'\bme\b', re.I) _myRe = re.compile(r'\bmy\b', re.I) def _replaceFirstPerson(self, s, nick): diff --git a/plugins/Later/README.md b/plugins/Later/README.md deleted file mode 100644 index 63c3c3b4b..000000000 --- a/plugins/Later/README.md +++ /dev/null @@ -1,21 +0,0 @@ -Later - leave small messages to users - -## Later - -Later allows you to leave small notes to people. The messages are delivered next time when the user is seen by the bot. - -### How to use it? - -Use the `later tell` command to leave a message to a user. If you sent the message by accident or want to cancel it, you can use the `later undo` command to remove the latest later, which you have sent. - -You can also see the people who have notes waiting for them by using the `later notes` command. If you specify a nickname in `later notes` command, you will see the notes, which are waiting for the nickname. - -### Privacy - -As you probably noticed from above, this plugin isn't private. Everyone can see notes sent by anyone and the laters are sent on channel by default and as the "plugin help later" says: - -``` -Used to do things later; currently, it only allows the sending of nick-based notes. Do note (haha!) that these notes are *not* private and don't even pretend to be; if you want such features, consider using the Note plugin. -``` - -The Note plugin identifies people by username instead of nickname and allows only users to send notes. The only people who are able to read notes are the sender, receiver and the owner. diff --git a/plugins/Later/README.rst b/plugins/Later/README.rst new file mode 100644 index 000000000..97e6b9e98 --- /dev/null +++ b/plugins/Later/README.rst @@ -0,0 +1,82 @@ +.. _plugin-Later: + +Documentation for the Later plugin for Supybot +============================================== + +Purpose +------- +Informal notes, mostly for compatibility with other bots. Based entirely on +nicks, it's an easy way to tell users who refuse to register notes when they +arrive later. + +Usage +----- +Used to do things later; currently, it only allows the sending of +nick-based notes. Do note (haha!) that these notes are *not* private +and don't even pretend to be; if you want such features, consider using the +Note plugin. + +Use the ``later tell`` command to leave a message to a user. +If you sent the message by accident or want to cancel it, +you can use the `later undo` command to remove the latest later, +which you have sent. + +You can also see the people who have notes waiting for them by using +the `later notes` command. If you specify a nickname in ``later notes`` +command, you will see the notes, which are waiting for the nickname. + +Privacy +------- + +As you probably noticed from above, this plugin isn't private. +Everyone can see notes sent by anyone and the laters are sent on channel +by default and as the "plugin help later" says:: + + Used to do things later; currently, it only allows the sending of nick-based notes. Do note (haha!) that these notes are *not* private and don't even pretend to be; if you want such features, consider using the Note plugin. + +The Note plugin identifies people by username instead of nickname +and allows only users to send notes. +The only people who are able to read notes are the sender, receiver, +and the owner. + +Commands +-------- +notes [] + If is given, replies with what notes are waiting on , otherwise, replies with the nicks that have notes waiting for them. + +remove + Removes the notes waiting on . + +tell + Tells each the next time is seen. can contain wildcard characters, and the first matching nick will be given the note. + +undo + Removes the latest note you sent to . + +Configuration +------------- +supybot.plugins.Later.maximum + This config variable defaults to "0", is not network-specific, and is not channel-specific. + + Determines the maximum number of messages to be queued for a user. If this value is 0, there is no maximum. + +supybot.plugins.Later.messageExpiry + This config variable defaults to "30", is not network-specific, and is not channel-specific. + + Determines the maximum number of days that a message will remain queued for a user. After this time elapses, the message will be deleted. If this value is 0, there is no maximum. + +supybot.plugins.Later.private + This config variable defaults to "False", is not network-specific, and is not channel-specific. + + Determines whether users will be notified in the first place in which they're seen, or in private. + +supybot.plugins.Later.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Later.tellOnJoin + This config variable defaults to "False", is not network-specific, and is not channel-specific. + + Determines whether users will be notified upon joining any channel the bot is in, or only upon sending a message. + diff --git a/plugins/Later/plugin.py b/plugins/Later/plugin.py index 989738441..4d7338a67 100644 --- a/plugins/Later/plugin.py +++ b/plugins/Later/plugin.py @@ -47,10 +47,36 @@ class QueueIsFull(Exception): pass class Later(callbacks.Plugin): - """Used to do things later; currently, it only allows the sending of + """ + Used to do things later; currently, it only allows the sending of nick-based notes. Do note (haha!) that these notes are *not* private and don't even pretend to be; if you want such features, consider using the - Note plugin.""" + Note plugin. + + Use the ``later tell`` command to leave a message to a user. + If you sent the message by accident or want to cancel it, + you can use the `later undo` command to remove the latest later, + which you have sent. + + You can also see the people who have notes waiting for them by using + the `later notes` command. If you specify a nickname in ``later notes`` + command, you will see the notes, which are waiting for the nickname. + + Privacy + ------- + + As you probably noticed from above, this plugin isn't private. + Everyone can see notes sent by anyone and the laters are sent on channel + by default and as the "plugin help later" says:: + + Used to do things later; currently, it only allows the sending of nick-based notes. Do note (haha!) that these notes are *not* private and don't even pretend to be; if you want such features, consider using the Note plugin. + + The Note plugin identifies people by username instead of nickname + and allows only users to send notes. + The only people who are able to read notes are the sender, receiver, + and the owner. + + """ def __init__(self, irc): self.__parent = super(Later, self) self.__parent.__init__(irc) diff --git a/plugins/Limiter/README.md b/plugins/Limiter/README.md deleted file mode 100644 index 40295695e..000000000 --- a/plugins/Limiter/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This will set a limit on the channel based on `plugins.Limiter.MaximumExcess` plus the current number of users in the channel. -This is useful to prevent flood attacks. diff --git a/plugins/Limiter/README.rst b/plugins/Limiter/README.rst new file mode 100644 index 000000000..d28aa9aaf --- /dev/null +++ b/plugins/Limiter/README.rst @@ -0,0 +1,42 @@ +.. _plugin-Limiter: + +Documentation for the Limiter plugin for Supybot +================================================ + +Purpose +------- +This plugin sets channel limits (MODE +l) based on +``plugins.Limiter.MaximumExcess`` plus the current number of users +in the channel. This is useful to prevent flood attacks. + +Usage +----- +In order to use this plugin, its config values need to be properly +setup. supybot.plugins.Limiter.enable needs to be set to True and +supybot.plugins.Limiter.{maximumExcess,minimumExcess} should be set to +values appropriate to your channel (if the defaults aren't satisfactory). +Once these are set, and someone enters/leaves the channel, Supybot will +start setting the proper +l modes. + +Configuration +------------- +supybot.plugins.Limiter.enable + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will maintain the channel limit to be slightly above the current number of people in the channel, in order to make clone/drone attacks harder. + +supybot.plugins.Limiter.maximumExcess + This config variable defaults to "10", is network-specific, and is channel-specific. + + Determines the maximum number of free spots that will be saved when limits are being enforced. This should always be larger than supybot.plugins.Limiter.limit.minimumExcess. + +supybot.plugins.Limiter.minimumExcess + This config variable defaults to "5", is network-specific, and is channel-specific. + + Determines the minimum number of free spots that will be saved when limits are being enforced. This should always be smaller than supybot.plugins.Limiter.limit.maximumExcess. + +supybot.plugins.Limiter.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Limiter/__init__.py b/plugins/Limiter/__init__.py index 0540a6b6e..3c05ee9dd 100644 --- a/plugins/Limiter/__init__.py +++ b/plugins/Limiter/__init__.py @@ -28,7 +28,9 @@ ### """ -This plugin handles channel limits (MODE +l). +This plugin sets channel limits (MODE +l) based on +``plugins.Limiter.MaximumExcess`` plus the current number of users +in the channel. This is useful to prevent flood attacks. """ import supybot diff --git a/plugins/LogToIrc/README.rst b/plugins/LogToIrc/README.rst new file mode 100644 index 000000000..8b1c2545f --- /dev/null +++ b/plugins/LogToIrc/README.rst @@ -0,0 +1,51 @@ +.. _plugin-LogToIrc: + +Documentation for the LogToIrc plugin for Supybot +================================================= + +Purpose +------- +Allows for sending the bot's logging output to channels or users. + +Configuration +------------- +supybot.plugins.LogToIrc.channelModesRequired + This config variable defaults to "s", is network-specific, and is not channel-specific. + + Determines what channel modes a channel will be required to have for the bot to log to the channel. If this string is empty, no modes will be checked. + +supybot.plugins.LogToIrc.color + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot's logs to IRC will be colorized with mIRC colors. + +supybot.plugins.LogToIrc.level + This config variable defaults to "WARNING", is network-specific, and is channel-specific. + + Determines what the minimum priority level logged will be to IRC. See supybot.log.level for possible values. DEBUG is disabled due to the large quantity of output. + +supybot.plugins.LogToIrc.networks + This config variable defaults to " ", is not network-specific, and is not channel-specific. + + Determines what networks the bot should log to. If no networks are set, the bot will log on one network (whichever happens to be around at the time it feels like logging). + +supybot.plugins.LogToIrc.notice + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot's logs to IRC will be sent via NOTICE instead of PRIVMSG. Channels will always be PRIVMSGed, regardless of this variable; NOTICEs will only be used if this variable is True and the target is a nick, not a channel. + +supybot.plugins.LogToIrc.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.LogToIrc.targets + This config variable defaults to " ", is network-specific, and is not channel-specific. + + Determines which channels/nicks the bot should log to. If no channels/nicks are set, this plugin will effectively be turned off. + +supybot.plugins.LogToIrc.userCapabilityRequired + This config variable defaults to "owner", is not network-specific, and is not channel-specific. + + Determines what capability is required for the bot to log to in private messages to the user. If this is empty, there will be no capability that's checked. + diff --git a/plugins/Math/README.md b/plugins/Math/README.md deleted file mode 100644 index 7d7dc6c62..000000000 --- a/plugins/Math/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin provides a calculator, converter, a list of units and other useful math functions. diff --git a/plugins/Math/README.rst b/plugins/Math/README.rst new file mode 100644 index 000000000..c29157fb2 --- /dev/null +++ b/plugins/Math/README.rst @@ -0,0 +1,42 @@ +.. _plugin-Math: + +Documentation for the Math plugin for Supybot +============================================= + +Purpose +------- +This plugin provides a calculator, converter, a list of units +and other useful math functions. + +Usage +----- +Provides commands to work with math, such as a calculator and +a unit converter. + +Commands +-------- +base [] + Converts from base to base . If is left out, it converts to decimal. + +calc + Returns the value of the evaluated . The syntax is Python syntax; the type of arithmetic is floating point. Floating point arithmetic is used in order to prevent a user from being able to crash to the bot with something like '10**10**10**10'. One consequence is that large values such as '10**24' might not be exact. + +convert [] to + Converts from to . If number isn't given, it defaults to 1. For unit information, see 'units' command. + +icalc + This is the same as the calc command except that it allows integer math, and can thus cause the bot to suck up CPU. Hence it requires the 'trusted' capability to use. + +rpn + Returns the value of an RPN expression. + +units [] + With no arguments, returns a list of measurement types, which can be passed as arguments. When called with a type as an argument, returns the units of that type. + +Configuration +------------- +supybot.plugins.Math.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Math/__init__.py b/plugins/Math/__init__.py index 541fc232a..e3cf6f438 100644 --- a/plugins/Math/__init__.py +++ b/plugins/Math/__init__.py @@ -28,7 +28,8 @@ ### """ -Various math-related commands. +This plugin provides a calculator, converter, a list of units +and other useful math functions. """ import supybot diff --git a/plugins/MessageParser/README.md b/plugins/MessageParser/README.md deleted file mode 100644 index 0f587ac1d..000000000 --- a/plugins/MessageParser/README.md +++ /dev/null @@ -1,3 +0,0 @@ -The MessageParser plugin allows you to set custom regexp triggers, which will trigger the bot to respond if they match anywhere in the message. This is useful for those cases when you want a bot response even when the bot was not explicitly addressed by name or prefix character. - -An updated page of this plugin's documentation is located here: http://sourceforge.net/p/gribble/wiki/MessageParser_Plugin/ diff --git a/plugins/MessageParser/README.rst b/plugins/MessageParser/README.rst new file mode 100644 index 000000000..4b604dead --- /dev/null +++ b/plugins/MessageParser/README.rst @@ -0,0 +1,96 @@ +.. _plugin-MessageParser: + +Documentation for the MessageParser plugin for Supybot +====================================================== + +Purpose +------- +The MessageParser plugin allows you to set custom regexp triggers, +which will trigger the bot to respond if they match anywhere in the message. +This is useful for those cases when you want a bot response even when the bot +was not explicitly addressed by name or prefix character. + +An updated page of this plugin's documentation is located here: +https://sourceforge.net/p/gribble/wiki/MessageParser_Plugin/ + +Usage +----- +This plugin can set regexp triggers to activate the bot. +Use 'add' command to add regexp trigger, 'remove' to remove. + +Commands +-------- +add [|global] + Associates with . is only necessary if the message isn't sent on the channel itself. Action is echoed upon regexp match, with variables $1, $2, etc. being interpolated from the regexp match groups. + +info [|global] [--id] + Display information about in the triggers database. is only necessary if the message isn't sent in the channel itself. If option --id specified, will retrieve by regexp id, not content. + +list [|global] + Lists regexps present in the triggers database. is only necessary if the message isn't sent in the channel itself. Regexp ID listed in parentheses. + +lock [|global] + Locks the so that it cannot be removed or overwritten to. is only necessary if the message isn't sent in the channel itself. + +rank [|global] + Returns a list of top-ranked regexps, sorted by usage count (rank). The number of regexps returned is set by the rankListLength registry value. is only necessary if the message isn't sent in the channel itself. + +remove [|global] [--id] ] + Removes the trigger for from the triggers database. is only necessary if the message isn't sent in the channel itself. If option --id specified, will retrieve by regexp id, not content. + +show [|global] [--id] + Looks up the value of in the triggers database. is only necessary if the message isn't sent in the channel itself. If option --id specified, will retrieve by regexp id, not content. + +unlock [|global] + Unlocks the entry associated with so that it can be removed or overwritten. is only necessary if the message isn't sent in the channel itself. + +vacuum [|global] + Vacuums the database for . See SQLite vacuum doc here: http://www.sqlite.org/lang_vacuum.html is only necessary if the message isn't sent in the channel itself. First check if user has the required capability specified in plugin config requireVacuumCapability. + +Configuration +------------- +supybot.plugins.MessageParser.enable + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the message parser is enabled. If enabled, will trigger on regexps added to the regexp db. + +supybot.plugins.MessageParser.enableForNotices + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the message parser is enabled for NOTICE messages too. + +supybot.plugins.MessageParser.keepRankInfo + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether we keep updating the usage count for each regexp, for popularity ranking. + +supybot.plugins.MessageParser.listSeparator + This config variable defaults to ", ", is network-specific, and is channel-specific. + + Determines the separator used between regexps when shown by the list command. + +supybot.plugins.MessageParser.maxTriggers + This config variable defaults to "0", is network-specific, and is channel-specific. + + Determines the maximum number of triggers in one message. Set this to 0 to allow an infinite number of triggers. + +supybot.plugins.MessageParser.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.MessageParser.rankListLength + This config variable defaults to "20", is network-specific, and is channel-specific. + + Determines the number of regexps returned by the triggerrank command. + +supybot.plugins.MessageParser.requireManageCapability + This config variable defaults to "admin; channel,op", is network-specific, and is channel-specific. + + Determines the capabilities required (if any) to manage the regexp database, including add, remove, lock, unlock. Use 'channel,capab' for channel-level capabilities. Note that absence of an explicit anticapability means user has capability. + +supybot.plugins.MessageParser.requireVacuumCapability + This config variable defaults to "admin", is network-specific, and is channel-specific. + + Determines the capability required (if any) to vacuum the database. + diff --git a/plugins/MessageParser/__init__.py b/plugins/MessageParser/__init__.py index 34cdcd46b..6f224adbe 100644 --- a/plugins/MessageParser/__init__.py +++ b/plugins/MessageParser/__init__.py @@ -29,8 +29,14 @@ ### """ -MessageParser can be configured to run commands when a message matches a -given trigger. +The MessageParser plugin allows you to set custom regexp triggers, +which will trigger the bot to respond if they match anywhere in the message. +This is useful for those cases when you want a bot response even when the bot +was not explicitly addressed by name or prefix character. + +An updated page of this plugin's documentation is located here: +https://sourceforge.net/p/gribble/wiki/MessageParser_Plugin/ + """ import supybot diff --git a/plugins/Misc/README.rst b/plugins/Misc/README.rst new file mode 100644 index 000000000..64e073fb5 --- /dev/null +++ b/plugins/Misc/README.rst @@ -0,0 +1,84 @@ +.. _plugin-Misc: + +Documentation for the Misc plugin for Supybot +============================================= + +Purpose +------- +Miscellaneous commands. + +Usage +----- +Miscellaneous commands to access Supybot core. This is a core +Supybot plugin that should not be removed! + +Commands +-------- +apropos + Searches for in the commands currently offered by the bot, returning a list of the commands containing that string. + +clearmores takes no arguments + Clears all mores for the current network. + +completenick [] [--match-case] + Returns the nick of someone on the channel whose nick begins with the given . defaults to the current channel. + +help [] [] + This command gives a useful description of what does. is only necessary if the command is in more than one plugin. You may also want to use the 'list' command to list all available plugins and commands. + +last [--{from,in,on,with,without,regexp} ] [--nolimit] + Returns the last message matching the given criteria. --from requires a nick from whom the message came; --in requires a channel the message was sent to; --on requires a network the message was sent on; --with requires some string that had to be in the message; --regexp requires a regular expression the message must match; --nolimit returns all the messages that can be found. By default, the channel this command is given in is searched. + +list [--private] [--unloaded] [] + Lists the commands available in the given plugin. If no plugin is given, lists the public plugins available. If --private is given, lists the private plugins. If --unloaded is given, it will list available plugins that are not loaded. + +more [] + If the last command was truncated due to IRC message length limitations, returns the next chunk of the result of the last command. If is given, it takes the continuation of the last command from instead of the person sending this message. + +noticetell + Tells the whatever is, in a notice. Use nested commands to your benefit here. + +ping takes no arguments + Checks to see if the bot is alive. + +source takes no arguments + Returns a URL saying where to get Limnoria. + +tell + Tells the whatever is. Use nested commands to your benefit here. + +version takes no arguments + Returns the version of the current bot. + +Configuration +------------- +supybot.plugins.Misc.customHelpString + This config variable defaults to "", is not network-specific, and is not channel-specific. + + Sets a custom help string, displayed when the 'help' command is called without arguments. + +supybot.plugins.Misc.listPrivatePlugins + This config variable defaults to "False", is not network-specific, and is not channel-specific. + + Determines whether the bot will list private plugins with the list command if given the --private switch. If this is disabled, non-owner users should be unable to see what private plugins are loaded. + +supybot.plugins.Misc.listUnloadedPlugins + This config variable defaults to "False", is not network-specific, and is not channel-specific. + + Determines whether the bot will list unloaded plugins with the list command if given the --unloaded switch. If this is disabled, non-owner users should be unable to see what unloaded plugins are available. + +supybot.plugins.Misc.mores + This config variable defaults to "1", is network-specific, and is channel-specific. + + Determines how many messages the bot will issue when using the 'more' command. + +supybot.plugins.Misc.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Misc.timestampFormat + This config variable defaults to "[%H:%M:%S]", is not network-specific, and is not channel-specific. + + Determines the format string for timestamps in the Misc.last command. Refer to the Python documentation for the time module to see what formats are accepted. If you set this variable to the empty string, the timestamp will not be shown. + diff --git a/plugins/MoobotFactoids/README.md b/plugins/MoobotFactoids/README.md deleted file mode 100644 index 66228fdde..000000000 --- a/plugins/MoobotFactoids/README.md +++ /dev/null @@ -1,11 +0,0 @@ -This plugin keeps factoids in your bot. - -To add factoid say -`@something is something` And when you call `@something` the bot says -`something is something`. - -If you want factoid to be in different format say (for example): -`@Hi is Hello` And when you call `@hi` the bot says `Hello.` - -If you want the bot to use /mes with Factoids, that is possible too. -`@test is tests.` and everytime when someone calls for `test` the bot answers `* bot tests.` diff --git a/plugins/MoobotFactoids/README.rst b/plugins/MoobotFactoids/README.rst new file mode 100644 index 000000000..c489f8963 --- /dev/null +++ b/plugins/MoobotFactoids/README.rst @@ -0,0 +1,76 @@ +.. _plugin-MoobotFactoids: + +Documentation for the MoobotFactoids plugin for Supybot +======================================================= + +Purpose +------- +Moobot factoid compatibility module. Moobot's factoids were originally +designed to emulate Blootbot's factoids, so in either case, you should find +this plugin comfortable. + +Usage +----- +An alternative to the Factoids plugin, this plugin keeps factoids in +your bot. + +To add factoid say +``@something is something`` And when you call ``@something`` the bot says +``something is something``. + +If you want factoid to be in different format say (for example): +``@Hi is Hello`` And when you call ``@hi`` the bot says ``Hello.`` + +If you want the bot to use /mes with Factoids, that is possible too. +``@test is tests.`` and everytime when someone calls for +``test`` the bot answers ``* bot tests.`` + +Commands +-------- +factinfo [] + Returns the various bits of info on the factoid for the given key. is only necessary if the message isn't sent in the channel itself. + +listauth [] + Lists the keys of the factoids with the given author. Note that if an author has an integer name, you'll have to use that author's id to use this function (so don't use integer usernames!). is only necessary if the message isn't sent in the channel itself. + +listkeys [] + Lists the keys of the factoids whose key contains the provided text. is only necessary if the message isn't sent in the channel itself. + +listvalues [] + Lists the keys of the factoids whose value contains the provided text. is only necessary if the message isn't sent in the channel itself. + +literal [] + Returns the literal factoid for the given factoid key. No parsing of the factoid value is done as it is with normal retrieval. is only necessary if the message isn't sent in the channel itself. + +lock [] + Locks the factoid with the given factoid key. Requires that the user be registered and have created the factoid originally. is only necessary if the message isn't sent in the channel itself. + +most [] {popular|authored|recent} + Lists the most {popular|authored|recent} factoids. "popular" lists the most frequently requested factoids. "authored" lists the author with the most factoids. "recent" lists the most recently created factoids. is only necessary if the message isn't sent in the channel itself. + +random [] + Displays a random factoid (along with its key) from the database. is only necessary if the message isn't sent in the channel itself. + +remove [] + Deletes the factoid with the given key. is only necessary if the message isn't sent in the channel itself. + +unlock [] + Unlocks the factoid with the given factoid key. Requires that the user be registered and have locked the factoid. is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.MoobotFactoids.mostCount + This config variable defaults to "10", is network-specific, and is channel-specific. + + Determines how many items are shown when the 'most' command is called. + +supybot.plugins.MoobotFactoids.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.MoobotFactoids.showFactoidIfOnlyOneMatch + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether or not the factoid value will be shown when a listkeys search returns only one factoid key. + diff --git a/plugins/MoobotFactoids/plugin.py b/plugins/MoobotFactoids/plugin.py index ecf56f49f..fa7fc744f 100755 --- a/plugins/MoobotFactoids/plugin.py +++ b/plugins/MoobotFactoids/plugin.py @@ -284,8 +284,21 @@ class SqliteMoobotDB(object): MoobotDB = plugins.DB('MoobotFactoids', {'sqlite3': SqliteMoobotDB}) class MoobotFactoids(callbacks.Plugin): - """An alternative to the Factoids plugin, this plugin keeps factoids in - your bot.""" + """ + An alternative to the Factoids plugin, this plugin keeps factoids in + your bot. + + To add factoid say + ``@something is something`` And when you call ``@something`` the bot says + ``something is something``. + + If you want factoid to be in different format say (for example): + ``@Hi is Hello`` And when you call ``@hi`` the bot says ``Hello.`` + + If you want the bot to use /mes with Factoids, that is possible too. + ``@test is tests.`` and everytime when someone calls for + ``test`` the bot answers ``* bot tests.`` + """ callBefore = ['Dunno'] def __init__(self, irc): self.db = MoobotDB() diff --git a/plugins/Network/README.md b/plugins/Network/README.md deleted file mode 100644 index be500983f..000000000 --- a/plugins/Network/README.md +++ /dev/null @@ -1 +0,0 @@ -Allows connecting/disconnecting to networks, displaying the bot's latency to the server, and other useful network-related commands. diff --git a/plugins/Network/README.rst b/plugins/Network/README.rst new file mode 100644 index 000000000..46c36a873 --- /dev/null +++ b/plugins/Network/README.rst @@ -0,0 +1,61 @@ +.. _plugin-Network: + +Documentation for the Network plugin for Supybot +================================================ + +Purpose +------- +Includes commands for connecting, disconnecting, and reconnecting to multiple +networks, as well as several other utility functions related to IRC networks +like showing the latency. + +Usage +----- +Provides network-related commands, such as connecting to multiple networks +and checking latency to the server. + +Commands +-------- +capabilities [] + Returns the list of IRCv3 capabilities available on the network. + +cmdall [ ...] + Perform (with its associated s) on all networks. + +command [ ...] + Gives the bot (with its associated s) on . + +connect [--nossl] [] [] + Connects to another network (which will be represented by the name provided in ) at . If port is not provided, it defaults to 6697, the default port for IRC with SSL. If password is provided, it will be sent to the server in a PASS command. If --nossl is provided, an SSL connection will not be attempted, and the port will default to 6667. + +disconnect [] + Disconnects from the network represented by the network . If is given, quits the network with the given quit message. + +driver [] + Returns the current network driver for . is only necessary if the message isn't sent on the network to which this command is to apply. + +latency [] + Returns the current latency to . is only necessary if the message isn't sent on the network to which this command is to apply. + +networks [--all] + Returns the networks to which the bot is currently connected. If --all is given, also includes networks known by the bot, but not connected to. + +reconnect [] [] + Disconnects and then reconnects to . If no network is given, disconnects and then reconnects to the network the command was given on. If no quit message is given, uses the configured one (supybot.plugins.Owner.quitMsg) or the nick of the person giving the command. + +uptime [] + Returns the time duration since the connection was established. + +whois [] + Returns the WHOIS response gives for . is only necessary if the network is different than the network the command is sent on. + +whowas [] + Returns the WHOIS response gives for . is only necessary if the network is different than the network the command is sent on. + +Configuration +------------- +supybot.plugins.Network.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Network/__init__.py b/plugins/Network/__init__.py index da50cd43c..0d94287b0 100644 --- a/plugins/Network/__init__.py +++ b/plugins/Network/__init__.py @@ -29,7 +29,8 @@ """ Includes commands for connecting, disconnecting, and reconnecting to multiple -networks, as well as several other utility functions related to IRC networks. +networks, as well as several other utility functions related to IRC networks +like showing the latency. """ import supybot diff --git a/plugins/News/README.md b/plugins/News/README.md deleted file mode 100644 index cf5e48f6c..000000000 --- a/plugins/News/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This plugin provides a means of maintaining News for a channel. It was -partially inspired by the news system used on #debian's bot. diff --git a/plugins/News/README.rst b/plugins/News/README.rst new file mode 100644 index 000000000..7974174f3 --- /dev/null +++ b/plugins/News/README.rst @@ -0,0 +1,39 @@ +.. _plugin-News: + +Documentation for the News plugin for Supybot +============================================= + +Purpose +------- +A module to allow each channel to have "news". News items may have expiration +dates. +It was partially inspired by the news system used on #debian's bot. + +Usage +----- +This plugin provides a means of maintaining News for a channel. + +Commands +-------- +add [] : + Adds a given news item of to a channel with the given . If isn't 0, that news item will expire seconds from now. is only necessary if the message isn't sent in the channel itself. + +change [] + Changes the news item with from according to the regular expression . should be of the form s/text/replacement/flags. is only necessary if the message isn't sent on the channel itself. + +news [] [] + Display the news items for in the format of '(#id) subject'. If is given, retrieve only that news item; otherwise retrieve all news items. is only necessary if the message isn't sent in the channel itself. + +old [] [] + Returns the old news item for with . If no number is given, returns all the old news items in reverse order. is only necessary if the message isn't sent in the channel itself. + +remove [] + Removes the news item with from . is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.News.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/News/__init__.py b/plugins/News/__init__.py index 25842ae79..92b34ea5e 100644 --- a/plugins/News/__init__.py +++ b/plugins/News/__init__.py @@ -30,6 +30,7 @@ """ A module to allow each channel to have "news". News items may have expiration dates. +It was partially inspired by the news system used on #debian's bot. """ import supybot diff --git a/plugins/NickAuth/README.md b/plugins/NickAuth/README.md deleted file mode 100644 index d3fa43fe6..000000000 --- a/plugins/NickAuth/README.md +++ /dev/null @@ -1,6 +0,0 @@ -This plugin allows users to use their network services account to -authenticate to the bot. - -They first have to use `@nickauth nick add ` while being identified to the bot and then use `@auth` -when they want to identify to the bot. - diff --git a/plugins/NickAuth/README.rst b/plugins/NickAuth/README.rst new file mode 100644 index 000000000..9b537e1d2 --- /dev/null +++ b/plugins/NickAuth/README.rst @@ -0,0 +1,39 @@ +.. _plugin-NickAuth: + +Documentation for the NickAuth plugin for Supybot +================================================= + +Purpose +------- +Support authentication based on nicks and network services. + +Usage +----- +This plugin allows users to use their network services account to +authenticate to the bot. + +They first have to use ``@nickauth nick add `` while being +identified to the bot and then use ``@auth`` when they want to +identify to the bot. + +Commands +-------- +auth takes no argument + Tries to authenticate you using network services. If you get no reply, it means you are not authenticated to the network services. + +nick add [] + Add to the list of nicks owned by the on the . You have to register this nick to the network services to be authenticated. defaults to the current network. + +nick list [] [] + Lists nicks of the on the network. defaults to the current network. + +nick remove [] + Remove from the list of nicks owned by the on the . defaults to the current network. + +Configuration +------------- +supybot.plugins.NickAuth.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/NickAuth/plugin.py b/plugins/NickAuth/plugin.py index 1ddcb11be..686b409d3 100644 --- a/plugins/NickAuth/plugin.py +++ b/plugins/NickAuth/plugin.py @@ -44,7 +44,15 @@ _ = PluginInternationalization('NickAuth') @internationalizeDocstring class NickAuth(callbacks.Plugin): - """Supports authentication based on nicks and network services.""" + """ + This plugin allows users to use their network services account to + authenticate to the bot. + + They first have to use ``@nickauth nick add `` while being + identified to the bot and then use ``@auth`` when they want to + identify to the bot. + """ + def __init__(self, irc): super(NickAuth, self).__init__(irc) self._requests = {} diff --git a/plugins/NickCapture/README.md b/plugins/NickCapture/README.md deleted file mode 100644 index 5388aad1a..000000000 --- a/plugins/NickCapture/README.md +++ /dev/null @@ -1 +0,0 @@ -This allows the bot to regain access to it's configured nick. diff --git a/plugins/NickCapture/README.rst b/plugins/NickCapture/README.rst new file mode 100644 index 000000000..1770bd642 --- /dev/null +++ b/plugins/NickCapture/README.rst @@ -0,0 +1,33 @@ +.. _plugin-NickCapture: + +Documentation for the NickCapture plugin for Supybot +==================================================== + +Purpose +------- +This module attempts to capture the bot's nick, watching for an opportunity to +switch to that nick. + +Usage +----- +This plugin constantly tries to take whatever nick is configured as +supybot.nick. Just make sure that's set appropriately, and thus plugin +will do the rest. + +Configuration +------------- +supybot.plugins.NickCapture.ison + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether the bot will check occasionally if its preferred nick is in use via the ISON command. + + supybot.plugins.NickCapture.ison.period + This config variable defaults to "600", is not network-specific, and is not channel-specific. + + Determines how often (in seconds) the bot will check whether its nick ISON. + +supybot.plugins.NickCapture.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Nickometer/README.md b/plugins/Nickometer/README.md deleted file mode 100644 index 62681eb11..000000000 --- a/plugins/Nickometer/README.md +++ /dev/null @@ -1 +0,0 @@ -Will tell you how lame a nick is by the command `@nickometer [nick]`. diff --git a/plugins/Nickometer/README.rst b/plugins/Nickometer/README.rst new file mode 100644 index 000000000..8ff07db01 --- /dev/null +++ b/plugins/Nickometer/README.rst @@ -0,0 +1,27 @@ +.. _plugin-Nickometer: + +Documentation for the Nickometer plugin for Supybot +=================================================== + +Purpose +------- +A port of Infobot's nickometer command from Perl. This plugin +provides one command (called nickometer) which will tell you how 'lame' +an IRC nick is. It's an elitist hacker thing, but quite fun. + +Usage +----- +Will tell you how lame a nick is by the command 'nickometer [nick]'. + +Commands +-------- +nickometer [] + Tells you how lame said nick is. If is not given, uses the nick of the person giving the command. + +Configuration +------------- +supybot.plugins.Nickometer.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Note/README.md b/plugins/Note/README.md deleted file mode 100644 index 85131f832..000000000 --- a/plugins/Note/README.md +++ /dev/null @@ -1 +0,0 @@ -Allows you to send notes to other users. \ No newline at end of file diff --git a/plugins/Note/README.rst b/plugins/Note/README.rst new file mode 100644 index 000000000..20e7ccf45 --- /dev/null +++ b/plugins/Note/README.rst @@ -0,0 +1,44 @@ +.. _plugin-Note: + +Documentation for the Note plugin for Supybot +============================================= + +Purpose +------- +A complete messaging system that allows users to leave 'notes' for other +users that can be retrieved later. + +Usage +----- +Allows you to send notes to other users. + +Commands +-------- +list [--{old,sent}] [--{from,to} ] + Retrieves the ids of all your unread notes. If --old is given, list read notes. If --sent is given, list notes that you have sent. If --from is specified, only lists notes sent to you from . If --to is specified, only lists notes sent by you to . + +next takes no arguments + Retrieves your next unread note, if any. + +note + Retrieves a single note by its unique note id. Use the 'note list' command to see what unread notes you have. + +reply + Sends a note in reply to . + +search [--{regexp} ] [--sent] [] + Searches your received notes for ones matching . If --regexp is given, its associated value is taken as a regexp and matched against the notes. If --sent is specified, only search sent notes. + +send ,[,[...]] + Sends a new note to the user specified. Multiple recipients may be specified by separating their names by commas. + +unsend + Unsends the note with the id given. You must be the author of the note, and it must be unread. + +Configuration +------------- +supybot.plugins.Note.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Owner/README.rst b/plugins/Owner/README.rst new file mode 100644 index 000000000..3e67dfaa6 --- /dev/null +++ b/plugins/Owner/README.rst @@ -0,0 +1,82 @@ +.. _plugin-Owner: + +Documentation for the Owner plugin for Supybot +============================================== + +Purpose +------- +Provides commands useful to the owner of the bot; the commands here require +their caller to have the 'owner' capability. This plugin is loaded by default. + +Usage +----- +Owner-only commands for core Supybot. This is a core Supybot module +that should not be removed! + +Commands +-------- +announce + Sends to all channels the bot is currently on and not lobotomized in. + +defaultcapability {add|remove} + Adds or removes (according to the first argument) from the default capabilities given to users (the configuration variable supybot.capabilities stores these). + +defaultplugin [--remove] [] + Sets the default plugin for to . If --remove is given, removes the current default plugin for . If no plugin is given, returns the current default plugin set for . See also, supybot.commands.defaultPlugins.importantPlugins. + +disable [] + Disables the command for all users (including the owners). If is given, only disables the from . If you want to disable a command for most users but not for yourself, set a default capability of -plugin.command or -command (if you want to disable the command in all plugins). + +enable [] + Enables the command for all users. If if given, only enables the from . This command is the inverse of disable. + +flush takes no arguments + Runs all the periodic flushers in world.flushers. This includes flushing all logs and all configuration changes to disk. + +ircquote + Sends the raw string given to the server. + +load [--deprecated] + Loads the plugin from any of the directories in conf.supybot.directories.plugins; usually this includes the main installed directory and 'plugins' in the current directory. --deprecated is necessary if you wish to load deprecated plugins. + +logmark + Logs to the global Supybot log at critical priority. Useful for marking logfiles for later searching. + +quit [] + Exits the bot with the QUIT message . If is not given, the default quit message (supybot.plugins.Owner.quitMsg) will be used. If there is no default quitMsg set, your nick will be used. The standard substitutions ($version, $nick, etc.) are all handled appropriately. + +reload + Unloads and subsequently reloads the plugin by name; use the 'list' command to see a list of the currently loaded plugins. + +reloadlocale takes no argument + Reloads the locale of the bot. + +rename + Renames in to the . + +unload + Unloads the callback by name; use the 'list' command to see a list of the currently loaded plugins. Obviously, the Owner plugin can't be unloaded. + +unrename + Removes all renames in . The plugin will be reloaded after this command is run. + +upkeep [] + Runs the standard upkeep stuff (flushes and gc.collects()). If given a level, runs that level of upkeep (currently, the only supported level is "high", which causes the bot to flush a lot of caches as well as do normal upkeep stuff). + +Configuration +------------- +supybot.plugins.Owner.announceFormat + This config variable defaults to "Announcement from my owner ($owner): $text", is not network-specific, and is not channel-specific. + + Determines the format of messages sent by the 'announce' command. $owner may be used for the username of the owner calling this command, and $text for the announcement being made. + +supybot.plugins.Owner.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Owner.quitMsg + This config variable defaults to "Limnoria $version", is not network-specific, and is not channel-specific. + + Determines what quit message will be used by default. If the quit command is called without a quit message, this will be used. If this value is empty, the nick of the person giving the quit command will be used. The standard substitutions ($version, $nick, etc.) are all handled appropriately. + diff --git a/plugins/Plugin/README.md b/plugins/Plugin/README.md deleted file mode 100644 index 4b715f86e..000000000 --- a/plugins/Plugin/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin allows you to see the plugins, which plugin a command belongs to, you can find out who the author of the command is and who contributed to it. \ No newline at end of file diff --git a/plugins/Plugin/README.rst b/plugins/Plugin/README.rst new file mode 100644 index 000000000..f980c91af --- /dev/null +++ b/plugins/Plugin/README.rst @@ -0,0 +1,41 @@ +.. _plugin-Plugin: + +Documentation for the Plugin plugin for Supybot +=============================================== + +Purpose +------- +This plugin handles various plugin-related things, such as getting help for +a plugin or retrieving author info. + +Usage +----- +This plugin exists to help users manage their plugins. Use 'plugin +list' to list the loaded plugins; use 'plugin help' to get the description +of a plugin; use the 'plugin' command itself to determine what plugin a +command exists in. + +Commands +-------- +author + Returns the author of . This is the person you should talk to if you have ideas, suggestions, or other comments about a given plugin. + +contributors [] + Replies with a list of people who made contributions to a given plugin. If is specified, that person's specific contributions will be listed. You can specify a person's name by their full name or their nick, which is shown inside brackets if available. + +help + Returns a useful description of how to use , if the plugin has one. + +plugin + Returns the name of the plugin that would be used to call . If it is not uniquely determined, returns list of all plugins that contain . + +plugins + Returns the names of all plugins that contain . + +Configuration +------------- +supybot.plugins.Plugin.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Plugin/plugin.py b/plugins/Plugin/plugin.py index 1fb08732e..7487d1b9d 100644 --- a/plugins/Plugin/plugin.py +++ b/plugins/Plugin/plugin.py @@ -40,10 +40,13 @@ _ = PluginInternationalization('Plugin') class Plugin(callbacks.Plugin): - """This plugin exists to help users manage their plugins. Use 'plugin + """ + This plugin exists to help users manage their plugins. Use 'plugin list' to list the loaded plugins; use 'plugin help' to get the description of a plugin; use the 'plugin' command itself to determine what plugin a - command exists in.""" + command exists in. + """ + @internationalizeDocstring def help(self, irc, msg, args, cb): """ diff --git a/plugins/PluginDownloader/README.md b/plugins/PluginDownloader/README.md deleted file mode 100644 index 5a6fdfad4..000000000 --- a/plugins/PluginDownloader/README.md +++ /dev/null @@ -1,37 +0,0 @@ -This plugin allows you to quickly download and install a plugin from other repositories. - -Usage -===== - -First start by using the `plugindownloader repolist` command to see the -available repositories. - -To see the plugins inside repository, use command -`plugindownloader repolist ` - -When you see anything interesting, you can use -`plugindownloader info ` to see what the plugin is -for. - -And finally to install the plugin, -`plugindownloader install `. - -Examples --------- - -``` -< Mikaela> @load PluginDownloader -< Limnoria> Ok. -< Mikaela> @plugindownloader repolist -< Limnoria> Antibody, GLolol, Hoaas, Iota, ProgVal, SpiderDave, boombot, code4lib, code4lib-edsu, code4lib-snapshot, doorbot, frumious, jonimoose, mailed-notifier, mtughan-weather, nanotube-bitcoin, nyuszika7h, nyuszika7h-old, pingdom, quantumlemur, resistivecorpse, scrum, skgsergio, stepnem -< Mikaela> @plugindownloader repolist ProgVal -< Limnoria> AttackProtector, AutoTrans, Biography, Brainfuck, ChannelStatus, Cleverbot, Coffee, Coinpan, Debian, ERepublik, Eureka, Fortune, GUI, GitHub, Glob2Chan, GoodFrench, I18nPlaceholder, IMDb, IgnoreNonVoice, Iwant, Kickme, LimnoriaChan, LinkRelay, ListEmpty, Listener, Markovgen, MegaHAL, MilleBornes, NoLatin1, NoisyKarma, OEIS, PPP, PingTime, Pinglist, RateLimit, Rbls, Redmine, Scheme, Seeks, (1 more message) -< Mikaela> more -< Limnoria> SilencePlugin, StdoutCapture, Sudo, SupyML, SupySandbox, TWSS, Trigger, Trivia, Twitter, TwitterStream, Untiny, Variables, WebDoc, WebLogs, WebStats, Website, WikiTrans, Wikipedia, WunderWeather -< Mikaela> @plugindownloader info ProgVal Wikipedia -< Limnoria> Grabs data from Wikipedia. -< Mikaela> @plugindownloader install ProgVal Wikipedia -< Limnoria> Ok. -< Mikaela> @load Wikipedia -< Limnoria> Ok. -``` diff --git a/plugins/PluginDownloader/README.rst b/plugins/PluginDownloader/README.rst new file mode 100644 index 000000000..e7c90a489 --- /dev/null +++ b/plugins/PluginDownloader/README.rst @@ -0,0 +1,69 @@ +.. _plugin-PluginDownloader: + +Documentation for the PluginDownloader plugin for Supybot +========================================================= + +Purpose +------- +This plugin allows you to quickly download and install a plugin from other +repositories. + +Usage +----- +This plugin allows you to install unofficial plugins from +multiple repositories easily. Use the "repolist" command to see list of +available repositories and "repolist " to list plugins, +which are available in that repository. When you want to install a plugin, +just run command "install ". + +First start by using the `plugindownloader repolist` command to see the +available repositories. + +To see the plugins inside repository, use command +`plugindownloader repolist ` + +When you see anything interesting, you can use +`plugindownloader info ` to see what the plugin is +for. + +And finally to install the plugin, +`plugindownloader install `. + +Examples +^^^^^^^^ + +:: + + < Mikaela> @load PluginDownloader + < Limnoria> Ok. + < Mikaela> @plugindownloader repolist + < Limnoria> Antibody, GLolol, Hoaas, Iota, ProgVal, SpiderDave, boombot, code4lib, code4lib-edsu, code4lib-snapshot, doorbot, frumious, jonimoose, mailed-notifier, mtughan-weather, nanotube-bitcoin, nyuszika7h, nyuszika7h-old, pingdom, quantumlemur, resistivecorpse, scrum, skgsergio, stepnem + < Mikaela> @plugindownloader repolist ProgVal + < Limnoria> AttackProtector, AutoTrans, Biography, Brainfuck, ChannelStatus, Cleverbot, Coffee, Coinpan, Debian, ERepublik, Eureka, Fortune, GUI, GitHub, Glob2Chan, GoodFrench, I18nPlaceholder, IMDb, IgnoreNonVoice, Iwant, Kickme, LimnoriaChan, LinkRelay, ListEmpty, Listener, Markovgen, MegaHAL, MilleBornes, NoLatin1, NoisyKarma, OEIS, PPP, PingTime, Pinglist, RateLimit, Rbls, Redmine, Scheme, Seeks, (1 more message) + < Mikaela> more + < Limnoria> SilencePlugin, StdoutCapture, Sudo, SupyML, SupySandbox, TWSS, Trigger, Trivia, Twitter, TwitterStream, Untiny, Variables, WebDoc, WebLogs, WebStats, Website, WikiTrans, Wikipedia, WunderWeather + < Mikaela> @plugindownloader info ProgVal Wikipedia + < Limnoria> Grabs data from Wikipedia. + < Mikaela> @plugindownloader install ProgVal Wikipedia + < Limnoria> Ok. + < Mikaela> @load Wikipedia + < Limnoria> Ok. + +Commands +-------- +info + Displays informations on the in the . + +install + Downloads and installs the from the . + +repolist [] + Displays the list of plugins in the . If is not given, returns a list of available repositories. + +Configuration +------------- +supybot.plugins.PluginDownloader.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/PluginDownloader/plugin.py b/plugins/PluginDownloader/plugin.py index dfd26843f..7cc058c90 100644 --- a/plugins/PluginDownloader/plugin.py +++ b/plugins/PluginDownloader/plugin.py @@ -320,11 +320,46 @@ repositories = utils.InsensitivePreservingDict({ }) class PluginDownloader(callbacks.Plugin): - """This plugin allows you to install unofficial plugins from + """ + This plugin allows you to install unofficial plugins from multiple repositories easily. Use the "repolist" command to see list of available repositories and "repolist " to list plugins, - which are available in that repository. When you want to install plugin, - just run command "install ".""" + which are available in that repository. When you want to install a plugin, + just run command "install ". + + First start by using the `plugindownloader repolist` command to see the + available repositories. + + To see the plugins inside repository, use command + `plugindownloader repolist ` + + When you see anything interesting, you can use + `plugindownloader info ` to see what the plugin is + for. + + And finally to install the plugin, + `plugindownloader install `. + + Examples + ^^^^^^^^ + + :: + + < Mikaela> @load PluginDownloader + < Limnoria> Ok. + < Mikaela> @plugindownloader repolist + < Limnoria> Antibody, GLolol, Hoaas, Iota, ProgVal, SpiderDave, boombot, code4lib, code4lib-edsu, code4lib-snapshot, doorbot, frumious, jonimoose, mailed-notifier, mtughan-weather, nanotube-bitcoin, nyuszika7h, nyuszika7h-old, pingdom, quantumlemur, resistivecorpse, scrum, skgsergio, stepnem + < Mikaela> @plugindownloader repolist ProgVal + < Limnoria> AttackProtector, AutoTrans, Biography, Brainfuck, ChannelStatus, Cleverbot, Coffee, Coinpan, Debian, ERepublik, Eureka, Fortune, GUI, GitHub, Glob2Chan, GoodFrench, I18nPlaceholder, IMDb, IgnoreNonVoice, Iwant, Kickme, LimnoriaChan, LinkRelay, ListEmpty, Listener, Markovgen, MegaHAL, MilleBornes, NoLatin1, NoisyKarma, OEIS, PPP, PingTime, Pinglist, RateLimit, Rbls, Redmine, Scheme, Seeks, (1 more message) + < Mikaela> more + < Limnoria> SilencePlugin, StdoutCapture, Sudo, SupyML, SupySandbox, TWSS, Trigger, Trivia, Twitter, TwitterStream, Untiny, Variables, WebDoc, WebLogs, WebStats, Website, WikiTrans, Wikipedia, WunderWeather + < Mikaela> @plugindownloader info ProgVal Wikipedia + < Limnoria> Grabs data from Wikipedia. + < Mikaela> @plugindownloader install ProgVal Wikipedia + < Limnoria> Ok. + < Mikaela> @load Wikipedia + < Limnoria> Ok. + """ threaded = True diff --git a/plugins/Praise/README.md b/plugins/Praise/README.md deleted file mode 100644 index b3f4e1e6a..000000000 --- a/plugins/Praise/README.md +++ /dev/null @@ -1,6 +0,0 @@ -Allows someone to praise someone or something. - -Example: -* If you add `hugs $who`. -* Someone says `@praise ChanServ`. -* `* bot hugs ChanServ` diff --git a/plugins/Praise/README.rst b/plugins/Praise/README.rst new file mode 100644 index 000000000..d902f98ca --- /dev/null +++ b/plugins/Praise/README.rst @@ -0,0 +1,57 @@ +.. _plugin-Praise: + +Documentation for the Praise plugin for Supybot +=============================================== + +Purpose +------- +Hand out praise to IRC denizens with this plugin. + +Usage +----- +Praise is a plugin for ... well, praising things. Feel free to add +your own flavor to it by customizing what praises it gives. Use "praise +add " to add new ones, making sure to include "$who" in where +you want to insert the thing being praised. + +Example: + +* If you add ``hugs $who`` +* Someone says ``@praise ChanServ``. +* ``* bot hugs ChanServ`` + +Commands +-------- +add [] + Adds to the praise database for . is only necessary if the message isn't sent in the channel itself. + +change [] + Changes the praise with id according to the regular expression . is only necessary if the message isn't sent in the channel itself. + +get [] + Gets the praise with id from the praise database for . is only necessary if the message isn't sent in the channel itself. + +praise [] [] [for ] + Praises (for , if given). If is given, uses that specific praise. is only necessary if the message isn't sent in the channel itself. + +remove [] + Removes the praise with id from the praise database for . is only necessary if the message isn't sent in the channel itself. + +search [] [--{regexp,by} ] [] + Searches for praises matching the criteria given. + +stats [] + Returns the number of praises in the database for . is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.Praise.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Praise.showIds + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will show the ids of a praise when the praise is given. + diff --git a/plugins/Praise/plugin.py b/plugins/Praise/plugin.py index 18e015d13..9b415704a 100644 --- a/plugins/Praise/plugin.py +++ b/plugins/Praise/plugin.py @@ -36,10 +36,17 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Praise') class Praise(plugins.ChannelIdDatabasePlugin): - """Praise is a plugin for ... well, praising things. Feel free to add + """ + Praise is a plugin for ... well, praising things. Feel free to add your own flavor to it by customizing what praises it gives. Use "praise add " to add new ones, making sure to include "$who" in where you want to insert the thing being praised. + + Example: + + * If you add ``hugs $who`` + * Someone says ``@praise ChanServ``. + * ``* bot hugs ChanServ`` """ _meRe = re.compile(r'\bme\b', re.I) _myRe = re.compile(r'\bmy\b', re.I) diff --git a/plugins/Protector/README.md b/plugins/Protector/README.md deleted file mode 100644 index fd16f914d..000000000 --- a/plugins/Protector/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Prevent users from doing things they are not supposed to do on a channel, -even if they have +o or +h. diff --git a/plugins/Protector/README.rst b/plugins/Protector/README.rst new file mode 100644 index 000000000..b14af8e88 --- /dev/null +++ b/plugins/Protector/README.rst @@ -0,0 +1,32 @@ +.. _plugin-Protector: + +Documentation for the Protector plugin for Supybot +================================================== + +Purpose +------- +Defends a channel against actions by people who don't have the proper +capabilities, even if they have +o or +h. + +Usage +----- +Prevents users from doing things they are not supposed to do on a channel, +even if they have +o or +h. + +Configuration +------------- +supybot.plugins.Protector.enable + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether this plugin is enabled in a given channel. + +supybot.plugins.Protector.immune + This config variable defaults to " ", is network-specific, and is channel-specific. + + Determines what nicks the bot will consider to be immune from enforcement. These nicks will not even have their actions watched by this plugin. In general, only the ChanServ for this network will be in this list. + +supybot.plugins.Protector.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Protector/__init__.py b/plugins/Protector/__init__.py index 52afe71cf..c3a0b1e97 100644 --- a/plugins/Protector/__init__.py +++ b/plugins/Protector/__init__.py @@ -29,7 +29,7 @@ """ Defends a channel against actions by people who don't have the proper -capabilities. +capabilities, even if they have +o or +h. """ import supybot diff --git a/plugins/Quote/README.md b/plugins/Quote/README.md deleted file mode 100644 index 8f7d29d68..000000000 --- a/plugins/Quote/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin allows you to add quotes to the database for the channel. \ No newline at end of file diff --git a/plugins/Quote/README.rst b/plugins/Quote/README.rst new file mode 100644 index 000000000..839945d7b --- /dev/null +++ b/plugins/Quote/README.rst @@ -0,0 +1,46 @@ +.. _plugin-Quote: + +Documentation for the Quote plugin for Supybot +============================================== + +Purpose +------- +Maintains a Quotes database for each channel. + +Usage +----- +This plugin allows you to add quotes to the database for a channel. + +Commands +-------- +add [] + Adds to the quote database for . is only necessary if the message isn't sent in the channel itself. + +change [] + Changes the quote with id according to the regular expression . is only necessary if the message isn't sent in the channel itself. + +get [] + Gets the quote with id from the quote database for . is only necessary if the message isn't sent in the channel itself. + +random [] + Returns a random quote from . is only necessary if the message isn't sent in the channel itself. + +remove [] + Removes the quote with id from the quote database for . is only necessary if the message isn't sent in the channel itself. + +replace [] + Replace quote with . is only necessary if the message isn't sent in the channel itself. + +search [] [--{regexp,by} ] [] + Searches for quotes matching the criteria given. + +stats [] + Returns the number of quotes in the database for . is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.Quote.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/QuoteGrabs/README.md b/plugins/QuoteGrabs/README.md deleted file mode 100644 index 0a1564ce5..000000000 --- a/plugins/QuoteGrabs/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Stores and displays quotes from channels. Quotes are stored randomly -and/or on user request. diff --git a/plugins/QuoteGrabs/README.rst b/plugins/QuoteGrabs/README.rst new file mode 100644 index 000000000..af3893b80 --- /dev/null +++ b/plugins/QuoteGrabs/README.rst @@ -0,0 +1,71 @@ +.. _plugin-QuoteGrabs: + +Documentation for the QuoteGrabs plugin for Supybot +=================================================== + +Purpose +------- +Quotegrabs are like IRC sound bites. When someone says something funny, +incriminating, stupid, outrageous, ... anything that might be worth +remembering, you can grab that quote for that person. With this plugin, you +can store many quotes per person and display their most recent quote, as well +as see who "grabbed" the quote in the first place. + +Usage +----- +Stores and displays quotes from channels. Quotes are stored randomly +and/or on user request. + +Commands +-------- +get [] + Return the quotegrab with the given . is only necessary if the message isn't sent in the channel itself. + +grab [] + Grabs a quote from by for the quotegrabs table. is only necessary if the message isn't sent in the channel itself. + +list [] + Returns a list of shortened quotes that have been grabbed for as well as the id of each quote. These ids can be used to get the full quote. is only necessary if the message isn't sent in the channel itself. + +quote [] + Returns 's latest quote grab in . is only necessary if the message isn't sent in the channel itself. + +random [] [] + Returns a randomly grabbed quote, optionally choosing only from those quotes grabbed for . is only necessary if the message isn't sent in the channel itself. + +say [] + Return the quotegrab with the given . is only necessary if the message isn't sent in the channel itself. + +search [] + Searches for in a quote. is only necessary if the message isn't sent in the channel itself. + +ungrab [] + Removes the grab (the last by default) on . is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.QuoteGrabs.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.QuoteGrabs.randomGrabber + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will randomly grab possibly-suitable quotes on occasion. The suitability of a given message is determined by ... + + supybot.plugins.QuoteGrabs.randomGrabber.averageTimeBetweenGrabs + This config variable defaults to "864000", is network-specific, and is channel-specific. + + Determines about how many seconds, on average, should elapse between random grabs. This is only an average value; grabs can happen from any time after half this time until never, although that's unlikely to occur. + + supybot.plugins.QuoteGrabs.randomGrabber.minimumCharacters + This config variable defaults to "8", is network-specific, and is channel-specific. + + Determines the minimum number of characters in a message for it to be considered for random grabbing. + + supybot.plugins.QuoteGrabs.randomGrabber.minimumWords + This config variable defaults to "3", is network-specific, and is channel-specific. + + Determines the minimum number of words in a message for it to be considered for random grabbing. + diff --git a/plugins/RSS/README.md b/plugins/RSS/README.md deleted file mode 100644 index 5553ef8aa..000000000 --- a/plugins/RSS/README.md +++ /dev/null @@ -1,36 +0,0 @@ -This plugin allows you to poll and periodically announce new items from -RSS feeds. - -In order to use this plugin you must have the following modules -installed: -* feedparser: http://feedparser.org/ - -Basic usage ------------ - -1. Add a feed using -`@rss add limnoria https://github.com/ProgVal/Limnoria/tags.atom`. - * This is RSS feed of Limnoria's stable releases. - * You can now check the latest news from the feed with `@limnoria`. -2. To have new news automatically announced on the channel, use -`@rss announce add Limnoria`. - -To add another feed, simply replace limnoria and the address using name -of the feed and address of the feed. For example, YLE News: - -1. `@rss add yle http://yle.fi/uutiset/rss/uutiset.rss?osasto=news` -2. `@rss announce add yle` - -News on their own lines ------------------------ - -If you want the feed topics to be on their own lines instead of being separated by -the separator which you have configured you can set `reply.onetoone` to False. - -Please first read the help for that configuration variable - -`@config help reply.onetoone` - -and understand what it says and then you can do - -`@config reply.onetoone False` diff --git a/plugins/RSS/README.rst b/plugins/RSS/README.rst new file mode 100644 index 000000000..2f51c5e25 --- /dev/null +++ b/plugins/RSS/README.rst @@ -0,0 +1,150 @@ +.. _plugin-RSS: + +Documentation for the RSS plugin for Supybot +============================================ + +Purpose +------- +Provides basic functionality for handling RSS/RDF feeds, and allows announcing +them periodically to channels. +In order to use this plugin you must have the following modules +installed: +* feedparser: http://feedparser.org/ + +Usage +----- +This plugin is useful both for announcing updates to RSS feeds in a +channel, and for retrieving the headlines of RSS feeds via command. Use +the "add" command to add feeds to this plugin, and use the "announce" +command to determine what feeds should be announced in a given channel. + +Basic usage +^^^^^^^^^^^ + +1. Add a feed using + ``@rss add limnoria https://github.com/ProgVal/Limnoria/tags.atom``. + + * This is RSS feed of Limnoria's stable releases. + * You can now check the latest news from the feed with ``@limnoria``. + +2. To have new news automatically announced on the channel, use + ``@rss announce add Limnoria``. + +To add another feed, simply replace limnoria and the address using name +of the feed and address of the feed. For example, YLE News: + +1. ``@rss add yle http://yle.fi/uutiset/rss/uutiset.rss?osasto=news`` +2. ``@rss announce add yle`` + +News on their own lines +^^^^^^^^^^^^^^^^^^^^^^^ + +If you want the feed topics to be on their own lines instead of being separated by +the separator which you have configured you can set `reply.onetoone` to False. + +Please first read the help for that configuration variable + +``@config help reply.onetoone`` + +and understand what it says and then you can do + +``@config reply.onetoone False`` + +Commands +-------- +add + Adds a command to this plugin that will look up the RSS feed at the given URL. + +announce add [] [ ...] + Adds the list of feeds to the current list of announced feeds in . Valid feeds include the names of registered feeds as well as URLs for RSS feeds. is only necessary if the message isn't sent in the channel itself. + +announce channels + Returns a list of channels that the given feed name or URL is being announced to. + +announce list [] + Returns the list of feeds announced in . is only necessary if the message isn't sent in the channel itself. + +announce remove [] [ ...] + Removes the list of feeds from the current list of announced feeds in . Valid feeds include the names of registered feeds as well as URLs for RSS feeds. is only necessary if the message isn't sent in the channel itself. + +info + Returns information from the given RSS feed, namely the title, URL, description, and last update date, if available. + +remove + Removes the command for looking up RSS feeds at from this plugin. + +rss [] + Gets the title components of the given RSS feed. If is given, return only that many headlines. + +Configuration +------------- +supybot.plugins.RSS.announce + This config variable defaults to " ", is network-specific, and is channel-specific. + + Determines which RSS feeds should be announced in the channel; valid input is a list of strings (either registered RSS feeds or RSS feed URLs) separated by spaces. + +supybot.plugins.RSS.announceFormat + This config variable defaults to "News from $feed_name: $title <$link>", is network-specific, and is channel-specific. + + The format the bot will use for displaying headlines of a RSS feed that is announced. See supybot.plugins.RSS.format for the available variables. + +supybot.plugins.RSS.defaultNumberOfHeadlines + This config variable defaults to "1", is network-specific, and is channel-specific. + + Indicates how many headlines an rss feed will output by default, if no number is provided. + +supybot.plugins.RSS.feeds + This config variable defaults to " ", is not network-specific, and is not channel-specific. + + Determines what feeds should be accessible as commands. + +supybot.plugins.RSS.format + This config variable defaults to "$date: $title <$link>", is network-specific, and is channel-specific. + + The format the bot will use for displaying headlines of a RSS feed that is triggered manually. In addition to fields defined by feedparser ($published (the entry date), $title, $link, $description, $id, etc.), the following variables can be used: $feed_name, $date (parsed date, as defined in supybot.reply.format.time) + +supybot.plugins.RSS.headlineSeparator + This config variable defaults to " | ", is network-specific, and is channel-specific. + + Determines what string is used to separate headlines in new feeds. + +supybot.plugins.RSS.initialAnnounceHeadlines + This config variable defaults to "5", is network-specific, and is channel-specific. + + Indicates how many headlines an rss feed will output when it is first added to announce for a channel. + +supybot.plugins.RSS.keywordBlacklist + This config variable defaults to " ", is network-specific, and is channel-specific. + + Space separated list of strings, lets you filter headlines to those not containing any items in this blacklist. + +supybot.plugins.RSS.keywordWhitelist + This config variable defaults to " ", is network-specific, and is channel-specific. + + Space separated list of strings, lets you filter headlines to those containing one or more items in this whitelist. + +supybot.plugins.RSS.maximumAnnounceHeadlines + This config variable defaults to "5", is network-specific, and is channel-specific. + + Indicates how many new news entries may be sent at the same time. Extra entries will be discarded. + +supybot.plugins.RSS.notice + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether announces will be sent as notices instead of privmsgs. + +supybot.plugins.RSS.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.RSS.sortFeedItems + This config variable defaults to "asInFeed", is not network-specific, and is not channel-specific. + + Determines whether feed items should be sorted by their publication/update timestamp or kept in the same order as they appear in a feed. Valid strings: asInFeed, oldestFirst, newestFirst, outdatedFirst, and updatedFirst. + +supybot.plugins.RSS.waitPeriod + This config variable defaults to "1800", is not network-specific, and is not channel-specific. + + Indicates how many seconds the bot will wait between retrieving RSS feeds; requests made within this period will return cached results. + diff --git a/plugins/RSS/__init__.py b/plugins/RSS/__init__.py index cf452a836..767bc5b74 100644 --- a/plugins/RSS/__init__.py +++ b/plugins/RSS/__init__.py @@ -28,7 +28,11 @@ ### """ -Provides basic functionality for handling RSS/RDF feeds. +Provides basic functionality for handling RSS/RDF feeds, and allows announcing +them periodically to channels. +In order to use this plugin you must have the following modules +installed: +* feedparser: http://feedparser.org/ """ import supybot diff --git a/plugins/RSS/plugin.py b/plugins/RSS/plugin.py index 165a63db8..260ae5325 100644 --- a/plugins/RSS/plugin.py +++ b/plugins/RSS/plugin.py @@ -183,10 +183,45 @@ def save_announces_db(db, fd): class RSS(callbacks.Plugin): - """This plugin is useful both for announcing updates to RSS feeds in a + """ + This plugin is useful both for announcing updates to RSS feeds in a channel, and for retrieving the headlines of RSS feeds via command. Use the "add" command to add feeds to this plugin, and use the "announce" - command to determine what feeds should be announced in a given channel.""" + command to determine what feeds should be announced in a given channel. + + Basic usage + ^^^^^^^^^^^ + + 1. Add a feed using + ``@rss add limnoria https://github.com/ProgVal/Limnoria/tags.atom``. + + * This is RSS feed of Limnoria's stable releases. + * You can now check the latest news from the feed with ``@limnoria``. + + 2. To have new news automatically announced on the channel, use + ``@rss announce add Limnoria``. + + To add another feed, simply replace limnoria and the address using name + of the feed and address of the feed. For example, YLE News: + + 1. ``@rss add yle http://yle.fi/uutiset/rss/uutiset.rss?osasto=news`` + 2. ``@rss announce add yle`` + + News on their own lines + ^^^^^^^^^^^^^^^^^^^^^^^ + + If you want the feed topics to be on their own lines instead of being separated by + the separator which you have configured you can set `reply.onetoone` to False. + + Please first read the help for that configuration variable + + ``@config help reply.onetoone`` + + and understand what it says and then you can do + + ``@config reply.onetoone False`` + + """ threaded = True def __init__(self, irc): self.__parent = super(RSS, self) diff --git a/plugins/Relay/README.md b/plugins/Relay/README.md deleted file mode 100644 index 909c27203..000000000 --- a/plugins/Relay/README.md +++ /dev/null @@ -1,9 +0,0 @@ -This plugin allows you to setup a relay between networks. - -Note that you must tell the bot to join the channel you wish to relay on - all networks with the `join` command or `network command join ` - or to join the channel on all networks `network cmdall join `. - -There are several advanced alternatives to this plugin, available as -third-party plugins. You can check them out at -https://limnoria.net/plugins.xhtml#messaging diff --git a/plugins/Relay/README.rst b/plugins/Relay/README.rst new file mode 100644 index 000000000..01af9b794 --- /dev/null +++ b/plugins/Relay/README.rst @@ -0,0 +1,85 @@ +.. _plugin-Relay: + +Documentation for the Relay plugin for Supybot +============================================== + +Purpose +------- +Handles relaying between networks. + +Usage +----- +This plugin allows you to setup a relay between networks. + +Note that you must tell the bot to join the channel you wish to relay on +all networks with the ``join`` command or +``network command join `` +or to join the channel on all networks ``network cmdall join ``. + +There are several advanced alternatives to this plugin, available as +third-party plugins. You can check them out at +https://limnoria.net/plugins.xhtml#messaging + +Commands +-------- +join [] + Starts relaying between the channel on all networks. If on a network the bot isn't in , it'll join. This commands is required even if the bot is in the channel on both networks; it won't relay between those channels unless it's told to join both channels. If is not given, starts relaying on the channel the message was sent in. + +nicks [] + Returns the nicks of the people in the channel on the various networks the bot is connected to. is only necessary if the message isn't sent on the channel itself. + +part + Ceases relaying between the channel on all networks. The bot will part from the channel on all networks in which it is on the channel. + +Configuration +------------- +supybot.plugins.Relay.channels + This config variable defaults to " ", is not network-specific, and is not channel-specific. + + Determines which channels the bot will relay in. + + supybot.plugins.Relay.channels.joinOnAllNetworks + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will always join the channel(s) it relays when connecting to any network. + +supybot.plugins.Relay.color + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will color relayed PRIVMSGs so as to make the messages easier to read. + +supybot.plugins.Relay.hostmasks + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will relay the hostmask of the person joining or parting the channel when they join or part. + +supybot.plugins.Relay.ignores + This config variable defaults to " ", is network-specific, and is channel-specific. + + Determines what hostmasks will not be relayed on a channel. + +supybot.plugins.Relay.includeNetwork + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will include the network in relayed PRIVMSGs; if you're only relaying between two networks, it's somewhat redundant, and you may wish to save the space. + +supybot.plugins.Relay.noticeNonPrivmsgs + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will used NOTICEs rather than PRIVMSGs for non-PRIVMSG relay messages (i.e., joins, parts, nicks, quits, modes, etc.) + +supybot.plugins.Relay.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Relay.punishOtherRelayBots + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will detect other bots relaying and respond by kickbanning them. + +supybot.plugins.Relay.topicSync + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will synchronize topics between networks in the channels it relays. + diff --git a/plugins/Relay/plugin.py b/plugins/Relay/plugin.py index 755903196..3be736655 100644 --- a/plugins/Relay/plugin.py +++ b/plugins/Relay/plugin.py @@ -43,7 +43,18 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Relay') class Relay(callbacks.Plugin): - """This plugin allows you to setup a relay between networks.""" + """ + This plugin allows you to setup a relay between networks. + + Note that you must tell the bot to join the channel you wish to relay on + all networks with the ``join`` command or + ``network command join `` + or to join the channel on all networks ``network cmdall join ``. + + There are several advanced alternatives to this plugin, available as + third-party plugins. You can check them out at + https://limnoria.net/plugins.xhtml#messaging + """ noIgnore = True def __init__(self, irc): self.__parent = super(Relay, self) diff --git a/plugins/Reply/README.md b/plugins/Reply/README.md deleted file mode 100644 index 575685cd1..000000000 --- a/plugins/Reply/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin allows you to use different reply commands. \ No newline at end of file diff --git a/plugins/Reply/README.rst b/plugins/Reply/README.rst new file mode 100644 index 000000000..ed97fee7e --- /dev/null +++ b/plugins/Reply/README.rst @@ -0,0 +1,40 @@ +.. _plugin-Reply: + +Documentation for the Reply plugin for Supybot +============================================== + +Purpose +------- +This plugin contains various commands which elicit certain types of responses +from the bot. + +Usage +----- +This plugin contains a few commands that construct various types of +replies. Some bot owners would be wise to not load this plugin because it +can be easily abused. + +Commands +-------- +action + Replies with as an action. Use nested commands to your benefit here. + +notice + Replies with in a notice. Use nested commands to your benefit here. If you want a private notice, nest the private command. + +private + Replies with in private. Use nested commands to your benefit here. + +replies [ ...] + Replies with each of its arguments in separate replies, depending the configuration of supybot.reply.oneToOne. + +reply + Replies with . Equivalent to the alias, 'echo $nick: $1'. + +Configuration +------------- +supybot.plugins.Reply.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Scheduler/README.md b/plugins/Scheduler/README.md deleted file mode 100644 index 68b593302..000000000 --- a/plugins/Scheduler/README.md +++ /dev/null @@ -1,2 +0,0 @@ -This plugin allows you to schedule commands to execute at a later time. -For example, `scheduler add [time seconds 30m] "utilities echo [status cpu]"` will schedule the command `cpu` to be sent to the channel in 30 minutes. diff --git a/plugins/Scheduler/README.rst b/plugins/Scheduler/README.rst new file mode 100644 index 000000000..8a9c0baba --- /dev/null +++ b/plugins/Scheduler/README.rst @@ -0,0 +1,40 @@ +.. _plugin-Scheduler: + +Documentation for the Scheduler plugin for Supybot +================================================== + +Purpose +------- +Gives the user the ability to schedule commands to run at a particular time, +or repeatedly run at a particular interval. For example, +``scheduler add [time seconds 30m] "utilities echo [status cpu]"`` +will schedule the command `cpu` to be sent to the channel in 30 minutes. + +Usage +----- +This plugin allows you to schedule commands to execute at a later time. + +Commands +-------- +add + Schedules the command string to run seconds in the future. For example, 'scheduler add [seconds 30m] "echo [cpu]"' will schedule the command "cpu" to be sent to the channel the schedule add command was given in (with no prefixed nick, a consequence of using echo). Do pay attention to the quotes in that example. + +list takes no arguments + Lists the currently scheduled events. + +remind + Sets a reminder with string to run seconds in the future. For example, 'scheduler remind [seconds 30m] "Hello World"' will return ' Reminder: Hello World' 30 minutes after being set. + +remove + Removes the event scheduled with id from the schedule. + +repeat [--delay ] + Schedules the command to run every seconds, starting now (i.e., the command runs now, and every seconds thereafter). is a name by which the command can be unscheduled. If --delay is given, starts in seconds instead of now. + +Configuration +------------- +supybot.plugins.Scheduler.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Scheduler/__init__.py b/plugins/Scheduler/__init__.py index 4996dc052..ba66af5e1 100644 --- a/plugins/Scheduler/__init__.py +++ b/plugins/Scheduler/__init__.py @@ -29,7 +29,9 @@ """ Gives the user the ability to schedule commands to run at a particular time, -or repeatedly run at a particular interval. +or repeatedly run at a particular interval. For example, +``scheduler add [time seconds 30m] "utilities echo [status cpu]"`` +will schedule the command `cpu` to be sent to the channel in 30 minutes. """ import supybot diff --git a/plugins/SedRegex/README.md b/plugins/SedRegex/README.md deleted file mode 100644 index d0eebd587..000000000 --- a/plugins/SedRegex/README.md +++ /dev/null @@ -1,25 +0,0 @@ -History replacer using sed-style expressions. - -### Configuration - -Enable SedRegex on the desired channels: `config channel #yourchannel plugins.sedregex.enable True` - -### Usage - -After enabling SedRegex, typing a regex in the form `s/text/replacement/` will make the bot announce replacements. - -``` -20:24 <~GL> helli world -20:24 <~GL> s/i/o/ -20:24 <@Lily> GL meant to say: hello world -``` - -You can also do `othernick: s/text/replacement/` to only replace messages from a certain user. Supybot ignores are respected by the plugin, and messages from ignored users will only be considered if their nick is explicitly given. - -#### Regex flags - -The following regex flags (i.e. the `g` in `s/abc/def/g`, etc.) are supported: - -- `i`: case insensitive replacement -- `g`: replace all occurences of the original text -- `s`: *(custom flag specific to this plugin)* replace only messages from the caller diff --git a/plugins/SedRegex/README.rst b/plugins/SedRegex/README.rst new file mode 100644 index 000000000..ce340f307 --- /dev/null +++ b/plugins/SedRegex/README.rst @@ -0,0 +1,70 @@ +.. _plugin-SedRegex: + +Documentation for the SedRegex plugin for Supybot +================================================= + +Purpose +------- +History replacer using sed-style expressions. + +Usage +----- +Enable SedRegex on the desired channels: +``config channel #yourchannel plugins.sedregex.enable True`` +After enabling SedRegex, typing a regex in the form +``s/text/replacement/`` will make the bot announce replacements. + +:: + + 20:24 <~GL> helli world + 20:24 <~GL> s/i/o/ + 20:24 <@Lily> GL meant to say: hello world + +You can also do ``othernick: s/text/replacement/`` to only replace +messages from a certain user. Supybot ignores are respected by the plugin, +and messages from ignored users will only be considered if their nick is +explicitly given. + +Regex flags +^^^^^^^^^^^ + +The following regex flags (i.e. the ``g`` in ``s/abc/def/g``, etc.) are +supported: + +- ``i``: case insensitive replacement +- ``g``: replace all occurences of the original text +- ``s``: *(custom flag specific to this plugin)* replace only messages + from the caller + +Configuration +------------- +supybot.plugins.SedRegex.boldReplacementText + This config variable defaults to "True", is network-specific, and is channel-specific. + + Should the replacement text be bolded? + +supybot.plugins.SedRegex.displayErrors + This config variable defaults to "True", is network-specific, and is channel-specific. + + Should errors be displayed? + +supybot.plugins.SedRegex.enable + This config variable defaults to "False", is network-specific, and is channel-specific. + + Should Perl/sed-style regex replacing work in this channel? + +supybot.plugins.SedRegex.ignoreRegex + This config variable defaults to "True", is network-specific, and is channel-specific. + + Should Perl/sed regex replacing ignore messages which look like valid regex? + +supybot.plugins.SedRegex.processTimeout + This config variable defaults to "0.5", is not network-specific, and is not channel-specific. + + Sets the timeout when processing a single regexp. The default should be adequate unless you have a busy or low-powered system that cannot process regexps quickly enough. However, you will not want to set this value too high as that would make your bot vulnerable to ReDoS attacks. + +supybot.plugins.SedRegex.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/SedRegex/plugin.py b/plugins/SedRegex/plugin.py index 5d54eb902..dc19fa924 100644 --- a/plugins/SedRegex/plugin.py +++ b/plugins/SedRegex/plugin.py @@ -61,7 +61,35 @@ class SearchNotFoundError(Exception): pass class SedRegex(callbacks.PluginRegexp): - """History replacer using sed-style regex syntax.""" + """ + Enable SedRegex on the desired channels: + ``config channel #yourchannel plugins.sedregex.enable True`` + After enabling SedRegex, typing a regex in the form + ``s/text/replacement/`` will make the bot announce replacements. + + :: + + 20:24 <~GL> helli world + 20:24 <~GL> s/i/o/ + 20:24 <@Lily> GL meant to say: hello world + + You can also do ``othernick: s/text/replacement/`` to only replace + messages from a certain user. Supybot ignores are respected by the plugin, + and messages from ignored users will only be considered if their nick is + explicitly given. + + Regex flags + ^^^^^^^^^^^ + + The following regex flags (i.e. the ``g`` in ``s/abc/def/g``, etc.) are + supported: + + - ``i``: case insensitive replacement + - ``g``: replace all occurences of the original text + - ``s``: *(custom flag specific to this plugin)* replace only messages + from the caller + """ + threaded = True public = True unaddressedRegexps = ['replacer'] diff --git a/plugins/Seen/README.md b/plugins/Seen/README.md deleted file mode 100644 index 2fd1e6a54..000000000 --- a/plugins/Seen/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin allows you to see when and what someone last said and what you missed since you parted the channel. \ No newline at end of file diff --git a/plugins/Seen/README.rst b/plugins/Seen/README.rst new file mode 100644 index 000000000..990a5253c --- /dev/null +++ b/plugins/Seen/README.rst @@ -0,0 +1,50 @@ +.. _plugin-Seen: + +Documentation for the Seen plugin for Supybot +============================================= + +Purpose +------- +Keeps track of the last time a user was seen on a channel +and what they last said. +It also allows you to see what you missed since you parted the channel. + +Usage +----- +This plugin allows you to see when and what someone last said and +what you missed since you left a channel. + +Commands +-------- +any [] [--user ] [] + Returns the last time was seen and what was last seen doing. This includes any form of activity, instead of just PRIVMSGs. If isn't specified, returns the last activity seen in . If --user is specified, looks up name in the user database and returns the last time user was active in . is only necessary if the message isn't sent on the channel itself. + +last [] + Returns the last thing said in . is only necessary if the message isn't sent in the channel itself. + +seen [] + Returns the last time was seen and what was last seen saying. is only necessary if the message isn't sent on the channel itself. may contain * as a wildcard. + +since [] [] + Returns the messages since last left the channel. If is not given, it defaults to the nickname of the person calling the command. + +user [] + Returns the last time was seen and what was last seen saying. This looks up in the user seen database, which means that it could be any nick recognized as user that was seen. is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.Seen.minimumNonWildcard + This config variable defaults to "2", is network-specific, and is channel-specific. + + The minimum non-wildcard characters required to perform a 'seen' request. Of course, it only applies if there is a wildcard in the request. + +supybot.plugins.Seen.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.Seen.showLastMessage + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the last message will be displayed with @seen. Useful for keeping messages from a channel private. + diff --git a/plugins/Seen/__init__.py b/plugins/Seen/__init__.py index 5e5d9f6e8..4a5db6abe 100644 --- a/plugins/Seen/__init__.py +++ b/plugins/Seen/__init__.py @@ -28,7 +28,9 @@ ### """ -Keeps track of the last time a user was seen on a channel. +Keeps track of the last time a user was seen on a channel +and what they last said. +It also allows you to see what you missed since you parted the channel. """ import supybot diff --git a/plugins/Services/README.md b/plugins/Services/README.md deleted file mode 100644 index 5d9a12ec4..000000000 --- a/plugins/Services/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin allows the bot to interact with ChanServ and NickServ to regain access to channels and it's nick. \ No newline at end of file diff --git a/plugins/Services/README.rst b/plugins/Services/README.rst new file mode 100644 index 000000000..f00ca32f3 --- /dev/null +++ b/plugins/Services/README.rst @@ -0,0 +1,110 @@ +.. _plugin-Services: + +Documentation for the Services plugin for Supybot +================================================= + +Purpose +------- +Services: Handles management of nicks with NickServ, and ops with ChanServ; +to (re)gain access to its own nick and channels. + +Usage +----- +This plugin handles dealing with Services on networks that provide them. +Basically, you should use the "password" command to tell the bot a nick to +identify with and what password to use to identify with that nick. You can +use the password command multiple times if your bot has multiple nicks +registered. Also, be sure to configure the NickServ and ChanServ +configuration variables to match the NickServ and ChanServ nicks on your +network. Other commands such as identify, op, etc. should not be +necessary if the bot is properly configured. + +Commands +-------- +ghost [] + Ghosts the bot's given nick and takes it. If no nick is given, ghosts the bot's configured nick and takes it. + +identify takes no arguments + Identifies with NickServ using the current nick. + +invite [] + Attempts to get invited by ChanServ to . is only necessary if the message isn't sent in the channel itself, but chances are, if you need this command, you're not sending it in the channel itself. + +nicks takes no arguments + Returns the nicks that this plugin is configured to identify and ghost with. + +op [] + Attempts to get opped by ChanServ in . is only necessary if the message isn't sent in the channel itself. + +password [] + Sets the NickServ password for to . If is not given, removes from the configured nicks. + +register [] [] + Uses the experimental REGISTER command to create an account for the bot on the , using the and the if provided. Some networks may require the email. You may need to use the 'services verify' command afterward to confirm your email address. + +unban [] + Attempts to get unbanned by ChanServ in . is only necessary if the message isn't sent in the channel itself, but chances are, if you need this command, you're not sending it in the channel itself. + +verify [] + If the requires a verification code, you need to call this command with the code the server gave you to finish the registration. + +voice [] + Attempts to get voiced by ChanServ in . is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.Services.ChanServ + This config variable defaults to "ChanServ", is network-specific, and is not channel-specific. + + Determines what nick the 'ChanServ' service has. + + supybot.plugins.Services.ChanServ.halfop + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will request to get half-opped by the ChanServ when it joins the channel. + + supybot.plugins.Services.ChanServ.op + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will request to get opped by the ChanServ when it joins the channel. + + supybot.plugins.Services.ChanServ.password + This config variable defaults to "", is network-specific, and is channel-specific. + + Determines what password the bot will use with ChanServ. + + supybot.plugins.Services.ChanServ.voice + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will request to get voiced by the ChanServ when it joins the channel. + +supybot.plugins.Services.NickServ + This config variable defaults to "NickServ", is network-specific, and is not channel-specific. + + Determines what nick the 'NickServ' service has. + +supybot.plugins.Services.disabledNetworks + This config variable defaults to "QuakeNet", is not network-specific, and is not channel-specific. + + Determines what networks this plugin will be disabled on. + +supybot.plugins.Services.ghostDelay + This config variable defaults to "60", is network-specific, and is not channel-specific. + + Determines how many seconds the bot will wait between successive GHOST attempts. Set this to 0 to disable GHOST. + +supybot.plugins.Services.nicks + This config variable defaults to " ", is network-specific, and is not channel-specific. + + Determines what nicks the bot will use with services. + +supybot.plugins.Services.noJoinsUntilIdentified + This config variable defaults to "False", is network-specific, and is not channel-specific. + + Determines whether the bot will not join any channels until it is identified. This may be useful, for instances, if you have a vhost that isn't set until you're identified, or if you're joining +r channels that won't allow you to join unless you identify. + +supybot.plugins.Services.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Services/__init__.py b/plugins/Services/__init__.py index c8c4e602b..ae4acd512 100644 --- a/plugins/Services/__init__.py +++ b/plugins/Services/__init__.py @@ -28,7 +28,8 @@ ### """ -Services: Handles management of nicks with NickServ, and ops with ChanServ. +Services: Handles management of nicks with NickServ, and ops with ChanServ; +to (re)gain access to its own nick and channels. """ import supybot diff --git a/plugins/ShrinkUrl/README.md b/plugins/ShrinkUrl/README.md deleted file mode 100644 index ed375c1dc..000000000 --- a/plugins/ShrinkUrl/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin features commands to shorten URLs through different services, like tinyurl. \ No newline at end of file diff --git a/plugins/ShrinkUrl/README.rst b/plugins/ShrinkUrl/README.rst new file mode 100644 index 000000000..11f5686b2 --- /dev/null +++ b/plugins/ShrinkUrl/README.rst @@ -0,0 +1,72 @@ +.. _plugin-ShrinkUrl: + +Documentation for the ShrinkUrl plugin for Supybot +================================================== + +Purpose +------- +Shrinks URLs using various URL shortening services, like tinyurl. + +Usage +----- +This plugin features commands to shorten URLs through different services, +like tinyurl. + +Commands +-------- +tiny + Returns a TinyURL.com version of + +ur1 + Returns an ur1 version of . + +x0 + Returns an x0.no version of . + +Configuration +------------- +supybot.plugins.ShrinkUrl.bold + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin will bold certain portions of its replies. + +supybot.plugins.ShrinkUrl.default + This config variable defaults to "x0", is network-specific, and is channel-specific. + + Determines what website the bot will use when shrinking a URL. Valid strings: tiny, ur1, and x0. + +supybot.plugins.ShrinkUrl.minimumLength + This config variable defaults to "48", is network-specific, and is channel-specific. + + The minimum length a URL must be before the bot will shrink it. + +supybot.plugins.ShrinkUrl.nonSnarfingRegexp + This config variable defaults to "", is network-specific, and is channel-specific. + + Determines what URLs are to be snarfed; URLs matching the regexp given will not be snarfed. Give the empty string if you have no URLs that you'd like to exclude from being snarfed. + +supybot.plugins.ShrinkUrl.outFilter + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the bot will shrink the URLs of outgoing messages if those URLs are longer than supybot.plugins.ShrinkUrl.minimumLength. + +supybot.plugins.ShrinkUrl.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + +supybot.plugins.ShrinkUrl.serviceRotation + This config variable defaults to " ", is network-specific, and is channel-specific. + + If set to a non-empty value, specifies the list of services to rotate through for the shrinkSnarfer and outFilter. + +supybot.plugins.ShrinkUrl.shrinkSnarfer + This config variable defaults to "False", is network-specific, and is channel-specific. + + Determines whether the shrink snarfer is enabled. This snarfer will watch for URLs in the channel, and if they're sufficiently long (as determined by supybot.plugins.ShrinkUrl.minimumLength) it will post a smaller URL from the service as denoted in supybot.plugins.ShrinkUrl.default. + + supybot.plugins.ShrinkUrl.shrinkSnarfer.showDomain + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the snarfer will show the domain of the URL being snarfed along with the shrunken URL. + diff --git a/plugins/ShrinkUrl/__init__.py b/plugins/ShrinkUrl/__init__.py index 55fd91c02..8f02443a7 100644 --- a/plugins/ShrinkUrl/__init__.py +++ b/plugins/ShrinkUrl/__init__.py @@ -29,7 +29,7 @@ ### """ -Shrinks URLs using various URL shrinking services. +Shrinks URLs using various URL shortening services, like tinyurl. """ import supybot diff --git a/plugins/Status/README.md b/plugins/Status/README.md deleted file mode 100644 index 2605b89ca..000000000 --- a/plugins/Status/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin allows you to view different bot statistics, for example, uptime. \ No newline at end of file diff --git a/plugins/Status/README.rst b/plugins/Status/README.rst new file mode 100644 index 000000000..0c56fb693 --- /dev/null +++ b/plugins/Status/README.rst @@ -0,0 +1,54 @@ +.. _plugin-Status: + +Documentation for the Status plugin for Supybot +=============================================== + +Purpose +------- +A simple module to handle various informational commands querying the bot's +current status and statistics, like its uptime. + +Usage +----- +This plugin allows you to view different bot statistics, for example, +uptime. + +Commands +-------- +cmd takes no arguments + Returns some interesting command-related statistics. + +commands takes no arguments + Returns a list of the commands offered by the bot. + +cpu takes no arguments + Returns some interesting CPU-related statistics on the bot. + +net takes no arguments + Returns some interesting network-related statistics. + +network takes no arguments + Returns the network the bot is on. + +processes takes no arguments + Returns the number of processes that have been spawned, and list of ones that are still active. + +server takes no arguments + Returns the server the bot is on. + +status takes no arguments + Returns the status of the bot. + +threads takes no arguments + Returns the current threads that are active. + +uptime takes no arguments + Returns the amount of time the bot has been running. + +Configuration +------------- +supybot.plugins.Status.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Status/__init__.py b/plugins/Status/__init__.py index 511e079cb..e1d7b0885 100644 --- a/plugins/Status/__init__.py +++ b/plugins/Status/__init__.py @@ -29,7 +29,7 @@ """ A simple module to handle various informational commands querying the bot's -current status and statistics. +current status and statistics, like its uptime. """ import supybot diff --git a/plugins/String/README.md b/plugins/String/README.md deleted file mode 100644 index 64d682c32..000000000 --- a/plugins/String/README.md +++ /dev/null @@ -1 +0,0 @@ -Useful commands for manipulating characters and strings. diff --git a/plugins/String/README.rst b/plugins/String/README.rst new file mode 100644 index 000000000..de53c6cc0 --- /dev/null +++ b/plugins/String/README.rst @@ -0,0 +1,61 @@ +.. _plugin-String: + +Documentation for the String plugin for Supybot +=============================================== + +Purpose +------- +Provides various commands to manipulate characters and strings. + +Usage +----- +Provides useful commands for manipulating characters and strings. + +Commands +-------- +chr + Returns the unicode character associated with codepoint + +decode + Returns an un-encoded form of the given text; the valid encodings are available in the documentation of the Python codecs module: . + +encode + Returns an encoded form of the given text; the valid encodings are available in the documentation of the Python codecs module: . + +len + Returns the length of . + +levenshtein + Returns the levenshtein distance (also known as the "edit distance" between and ) + +md5 + Returns the md5 hash of a given string. + +ord + Returns the unicode codepoint of . + +re + If is of the form m/regexp/flags, returns the portion of that matches the regexp. If is of the form s/regexp/replacement/flags, returns the result of applying such a regexp to . + +sha + Returns the SHA1 hash of a given string. + +soundex [] + Returns the Soundex hash to a given length. The length defaults to 4, since that's the standard length for a soundex hash. For unlimited length, use 0. Maximum length 1024. + +unicodename + Returns the name of the given unicode . + +unicodesearch + Searches for a unicode character from its . + +xor + Returns XOR-encrypted with . + +Configuration +------------- +supybot.plugins.String.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/String/__init__.py b/plugins/String/__init__.py index f69fbd1d8..96d82e91c 100644 --- a/plugins/String/__init__.py +++ b/plugins/String/__init__.py @@ -28,7 +28,7 @@ ### """ -Provides various string-related commands. +Provides various commands to manipulate characters and strings. """ import supybot diff --git a/plugins/Success/README.md b/plugins/Success/README.md deleted file mode 100644 index 6b4413249..000000000 --- a/plugins/Success/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin allows you to add your own success messages to replace the default 'The operation succeeded.' message. \ No newline at end of file diff --git a/plugins/Success/README.rst b/plugins/Success/README.rst new file mode 100644 index 000000000..dc449c4ac --- /dev/null +++ b/plugins/Success/README.rst @@ -0,0 +1,51 @@ +.. _plugin-Success: + +Documentation for the Success plugin for Supybot +================================================ + +Purpose +------- +The Success plugin spices up success replies by allowing custom messages +instead of the default 'The operation succeeded.' message; +like Dunno does for "no such command" replies. + +Usage +----- +This plugin was written initially to work with MoobotFactoids, the two +of them to provide a similar-to-moobot-and-blootbot interface for factoids. +Basically, it replaces the standard 'The operation succeeded.' messages +with messages kept in a database, able to give more personable +responses. + +Commands +-------- +add [] + Adds to the success database for . is only necessary if the message isn't sent in the channel itself. + +change [] + Changes the success with id according to the regular expression . is only necessary if the message isn't sent in the channel itself. + +get [] + Gets the success with id from the success database for . is only necessary if the message isn't sent in the channel itself. + +remove [] + Removes the success with id from the success database for . is only necessary if the message isn't sent in the channel itself. + +search [] [--{regexp,by} ] [] + Searches for successes matching the criteria given. + +stats [] + Returns the number of successes in the database for . is only necessary if the message isn't sent in the channel itself. + +Configuration +------------- +supybot.plugins.Success.prefixNick + This config variable defaults to "True", is network-specific, and is channel-specific. + + Determines whether the bot will prefix the nick of the user giving an invalid command to the success response. + +supybot.plugins.Success.public + This config variable defaults to "True", is not network-specific, and is not channel-specific. + + Determines whether this plugin is publicly visible. + diff --git a/plugins/Success/__init__.py b/plugins/Success/__init__.py index 50eb7d55c..01f290e3f 100644 --- a/plugins/Success/__init__.py +++ b/plugins/Success/__init__.py @@ -28,8 +28,9 @@ ### """ -The Success plugin spices up success replies just like Dunno spices up -"no such command" replies. +The Success plugin spices up success replies by allowing custom messages +instead of the default 'The operation succeeded.' message; +like Dunno does for "no such command" replies. """ import supybot diff --git a/plugins/Time/README.md b/plugins/Time/README.md deleted file mode 100644 index 8b505a45c..000000000 --- a/plugins/Time/README.md +++ /dev/null @@ -1 +0,0 @@ -This plugin allows you to use different time functions. \ No newline at end of file diff --git a/plugins/Time/README.rst b/plugins/Time/README.rst new file mode 100644 index 000000000..2a6552a3c --- /dev/null +++ b/plugins/Time/README.rst @@ -0,0 +1,51 @@ +.. _plugin-Time: + +Documentation for the Time plugin for Supybot +============================================= + +Purpose +------- +A plugin for time-related functions. + +Usage +----- +This plugin allows you to use different time-related functions. + +Commands +-------- +at [