mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-25 12:19:24 +01:00
all plugins: auto-generate READMEs
Starting with this commit, there should be no "original" text in READMEs. Instead, the entire text should be in docstrings, and READMEs should be automatically generated from these docstrings. Motivation: * The same help is available both via IRC and in the README (although the README can be more detailed, as only the first paragraph will be shown on IRC) * This will allow auto-generating plugin help on docs.limnoria.net using the same content as the README, as it's sourced from the docstrings Additionally, this converts all READMEs from Markdown to ReST, because the documentation already uses ReST, and other docstrings in the codebase are in ReST for this reason.
This commit is contained in:
parent
76b6c56919
commit
833af36b08
55
plugins/Admin/README.rst
Normal file
55
plugins/Admin/README.rst
Normal file
@ -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 <command> [<arg> ...]
|
||||
Perform <command> (with associated <arg>s on all channels on current network.
|
||||
|
||||
capability add <name|hostmask> <capability>
|
||||
Gives the user specified by <name> (or the user to whom <hostmask> currently maps) the specified capability <capability>
|
||||
|
||||
capability remove <name|hostmask> <capability>
|
||||
Takes from the user specified by <name> (or the user to whom <hostmask> currently maps) the specified capability <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 <hostmask|nick> [<expires>]
|
||||
This will set a persistent ignore on <hostmask> or the hostmask currently associated with <nick>. <expires> 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 <hostmask|nick>
|
||||
This will remove the persistent ignore on <hostmask> or the hostmask currently associated with <nick>.
|
||||
|
||||
join <channel> [<key>]
|
||||
Tell the bot to join the given channel. If <key> is given, it is used when attempting to join the channel.
|
||||
|
||||
nick [<nick>] [<network>]
|
||||
Changes the bot's nick to <nick>. 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.
|
||||
|
@ -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.
|
||||
|
||||
```
|
||||
<jamessan> @load Alias
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @load Aka
|
||||
<bot> jamessan: The operation succeeded.
|
||||
|
||||
```
|
||||
|
||||
Then we import the Alias database to Aka in case it exists and unload
|
||||
Alias.
|
||||
|
||||
```
|
||||
<jamessan> @importaliasdatabase
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @unload Alias
|
||||
<bot> jamessan: The operation succeeded.
|
||||
```
|
||||
|
||||
And now we will finally add the Aka `alias` itself.
|
||||
|
||||
```
|
||||
<jamessan> @aka add "alias" "aka $1 $*"
|
||||
<bot> 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
|
||||
|
||||
```
|
||||
<jamessan> @aka add trout "reply action slaps $1 with a large trout"
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @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.
|
115
plugins/Aka/README.rst
Normal file
115
plugins/Aka/README.rst
Normal file
@ -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::
|
||||
|
||||
<jamessan> @load Alias
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @load Aka
|
||||
<bot> jamessan: The operation succeeded.
|
||||
|
||||
Then we import the Alias database to Aka in case it exists and unload
|
||||
Alias::
|
||||
|
||||
<jamessan> @importaliasdatabase
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @unload Alias
|
||||
<bot> jamessan: The operation succeeded.
|
||||
|
||||
And now we will finally add the Aka ``alias`` itself::
|
||||
|
||||
<jamessan> @aka add "alias" "aka $1 $*"
|
||||
<bot> 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::
|
||||
|
||||
<jamessan> @aka add trout "reply action slaps $1 with a large trout"
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @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>] <name> <command>
|
||||
Defines an alias <name> that executes <command>. The <command> 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>] <name>
|
||||
Removes the given alias, if unlocked.
|
||||
|
||||
lock [--channel <#channel>] <alias>
|
||||
Locks an alias so that no one else can change it.
|
||||
|
||||
unlock [--channel <#channel>] <alias>
|
||||
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>] <alias>
|
||||
This command shows the content of an Aka.
|
||||
|
||||
list [--channel <#channel>] [--keys] [--unlocked|--locked]
|
||||
Lists all Akas defined for <channel>. If <channel> is not specified, lists all global Akas. If --keys is given, lists only the Aka names and not their commands.
|
||||
|
||||
set [--channel <#channel>] <name> <command>
|
||||
Overwrites an existing alias <name> to execute <command> instead. The <command> 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>] <query>
|
||||
Searches Akas defined for <channel>. If <channel> 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.
|
||||
|
@ -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::
|
||||
|
||||
<jamessan> @load Alias
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @load Aka
|
||||
<bot> jamessan: The operation succeeded.
|
||||
|
||||
Then we import the Alias database to Aka in case it exists and unload
|
||||
Alias::
|
||||
|
||||
<jamessan> @importaliasdatabase
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @unload Alias
|
||||
<bot> jamessan: The operation succeeded.
|
||||
|
||||
And now we will finally add the Aka ``alias`` itself::
|
||||
|
||||
<jamessan> @aka add "alias" "aka $1 $*"
|
||||
<bot> 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::
|
||||
|
||||
<jamessan> @aka add trout "reply action slaps $1 with a large trout"
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @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)
|
||||
|
@ -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
|
||||
|
||||
```
|
||||
<jamessan> @alias add trout "action slaps $1 with a large trout"
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @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.
|
63
plugins/Alias/README.rst
Normal file
63
plugins/Alias/README.rst
Normal file
@ -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::
|
||||
|
||||
<jamessan> @alias add trout "action slaps $1 with a large trout"
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @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 <name> <command>
|
||||
Defines an alias <name> that executes <command>. The <command> 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 <alias>
|
||||
Locks an alias so that no one else can change it.
|
||||
|
||||
remove <name>
|
||||
Removes the given alias, if unlocked.
|
||||
|
||||
unlock <alias>
|
||||
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
|
||||
|
@ -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::
|
||||
|
||||
<jamessan> @alias add trout "action slaps $1 with a large trout"
|
||||
<bot> jamessan: The operation succeeded.
|
||||
<jamessan> @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)
|
||||
|
@ -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 <operator nick> Hi, my owner is <your nick> :)
|
||||
```
|
||||
|
||||
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 <your nick> :)` to `operator nick`.
|
||||
* Note that you won't see the messages that are sent to the bot.
|
87
plugins/Anonymous/README.rst
Normal file
87
plugins/Anonymous/README.rst
Normal file
@ -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 <operator nick> Hi, my owner is <your nick> :)
|
||||
|
||||
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 <your nick> :)`` to ``operator nick``.
|
||||
|
||||
* Note that you won't see the messages that are sent to the bot.
|
||||
|
||||
Commands
|
||||
--------
|
||||
do <channel> <action>
|
||||
Performs <action> in <channel>.
|
||||
|
||||
react <channel> <reaction> <nick>
|
||||
Sends the <reaction> to <nick>'s last message. <reaction> 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 <channel> <text>
|
||||
Sends <text> to <channel>.
|
||||
|
||||
tell <nick> <text>
|
||||
Sends <text> to <nick>. 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.
|
||||
|
@ -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 <operator nick> Hi, my owner is <your nick> :)
|
||||
|
||||
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 <your nick> :)`` 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):
|
||||
|
@ -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).
|
90
plugins/AutoMode/README.rst
Normal file
90
plugins/AutoMode/README.rst
Normal file
@ -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 <channel>,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 <channel>,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 <channel>,voice capability when they join the channel.
|
||||
|
@ -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
|
||||
|
@ -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)
|
33
plugins/Autocomplete/README.rst
Normal file
33
plugins/Autocomplete/README.rst
Normal file
@ -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 <https://github.com/ircv3/ircv3-specifications/pull/415>`_
|
||||
|
||||
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.
|
||||
|
@ -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 <https://github.com/ircv3/ircv3-specifications/pull/415>`_
|
||||
"""
|
||||
|
||||
import sys
|
||||
|
@ -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.
|
81
plugins/BadWords/README.rst
Normal file
81
plugins/BadWords/README.rst
Normal file
@ -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 <word> [<word> ...]
|
||||
Adds all <word>s to the list of words being censored.
|
||||
|
||||
list takes no arguments
|
||||
Returns the list of words being censored.
|
||||
|
||||
remove <word> [<word> ...]
|
||||
Removes <word>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.
|
||||
|
@ -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
|
||||
|
162
plugins/Channel/README.rst
Normal file
162
plugins/Channel/README.rst
Normal file
@ -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 [<channel>] <text>
|
||||
Sends <text> to all the users in <channel> who have the <channel>,op capability.
|
||||
|
||||
ban add [<channel>] <nick|hostmask> [<expires>]
|
||||
If you have the #channel,op capability, this will effect a persistent ban from interacting with the bot on the given <hostmask> (or the current hostmask associated with <nick>). Other plugins may enforce this ban by actually banning users with matching hostmasks when they join. <expires> is an optional argument specifying when (in "seconds from now") the ban should expire; if none is given, the ban will never automatically expire. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
ban hostmask [<channel>] <banmask>
|
||||
Bans the <banmask> from the <channel>.
|
||||
|
||||
ban list [<channel>] [<mask>]
|
||||
If you have the #channel,op capability, this will show you the current persistent bans on the <channel> 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 [<channel>] <hostmask>
|
||||
If you have the #channel,op capability, this will remove the persistent ban on <hostmask>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
capability add [<channel>] <nick|username> <capability> [<capability> ...]
|
||||
If you have the #channel,op capability, this will give the <username> (or the user to whom <nick> maps) the capability <capability> in the channel. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
capability list [<channel>]
|
||||
Returns the capabilities present on the <channel>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
capability remove [<channel>] <name|hostmask> <capability> [<capability> ...]
|
||||
If you have the #channel,op capability, this will take from the user currently identified as <name> (or the user to whom <hostmask> maps) the capability <capability> in the channel. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
capability set [<channel>] <capability> [<capability> ...]
|
||||
If you have the #channel,op capability, this will add the channel capability <capability> for all users in the channel. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
capability setdefault [<channel>] {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. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
capability unset [<channel>] <capability> [<capability> ...]
|
||||
If you have the #channel,op capability, this will unset the channel capability <capability> so each user's specific capability or the channel default capability will take precedence. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
cycle [<channel>] [<reason>]
|
||||
If you have the #channel,op capability, this will cause the bot to "cycle", or PART and then JOIN the channel. <channel> is only necessary if the message isn't sent in the channel itself. If <reason> 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 [<channel>] [<nick> ...]
|
||||
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 [<channel>] [<nick> ...]
|
||||
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 [<channel>] [<nick> ...]
|
||||
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 [<channel>] [<plugin>] [<command>]
|
||||
If you have the #channel,op capability, this will disable the <command> in <channel>. If <plugin> is provided, <command> will be disabled only for that plugin. If only <plugin> is provided, all commands in the given plugin will be disabled. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
enable [<channel>] [<plugin>] [<command>]
|
||||
If you have the #channel,op capability, this will enable the <command> in <channel> if it has been disabled. If <plugin> is provided, <command> will be enabled only for that plugin. If only <plugin> is provided, all commands in the given plugin will be enabled. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
halfop [<channel>] [<nick> ...]
|
||||
If you have the #channel,halfop capability, this will give all the <nick>s you provide halfops. If you don't provide any <nick>s, this will give you halfops. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
iban [<channel>] [--{exact,nick,user,host}] <nick> [<seconds>]
|
||||
If you have the #channel,op capability, this will ban <nick> 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. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
ignore add [<channel>] <nick|hostmask> [<expires>]
|
||||
If you have the #channel,op capability, this will set a persistent ignore on <hostmask> or the hostmask currently associated with <nick>. <expires> 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. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
ignore list [<channel>]
|
||||
Lists the hostmasks that the bot is ignoring on the given channel. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
ignore remove [<channel>] <nick|hostmask>
|
||||
If you have the #channel,op capability, this will remove the persistent ignore on <hostmask> in the channel. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
invite [<channel>] <nick>
|
||||
If you have the #channel,op capability, this will invite <nick> to join <channel>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
kban [<channel>] [--{exact,nick,user,host}] <nick> [<seconds>] [<reason>]
|
||||
If you have the #channel,op capability, this will kickban <nick> 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. <reason> is a reason to give for the kick. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
key [<channel>] [<key>]
|
||||
Sets the keyword in <channel> to <key>. If <key> is not given, removes the keyword requirement to join <channel>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
kick [<channel>] <nick>[, <nick>, ...] [<reason>]
|
||||
Kicks <nick>(s) from <channel> for <reason>. If <reason> isn't given, uses the nick of the person making the command as the reason. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
limit [<channel>] [<limit>]
|
||||
Sets the channel limit to <limit>. If <limit> is 0, or isn't given, removes the channel limit. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
listbans [<channel>]
|
||||
List all bans on the channel. If <channel> is not given, it defaults to the current channel.
|
||||
|
||||
lobotomy add [<channel>]
|
||||
If you have the #channel,op capability, this will "lobotomize" the bot, making it silent and unanswering to all requests made in the channel. <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 [<channel>]
|
||||
If you have the #channel,op capability, this will unlobotomize the bot, making it respond to requests made in the channel again. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
mode [<channel>] <mode> [<arg> ...]
|
||||
Sets the mode in <channel> to <mode>, sending the arguments given. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
moderate [<channel>]
|
||||
Sets +m on <channel>, making it so only ops and voiced users can send messages to the channel. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
nicks [<channel>] [--count]
|
||||
Returns the nicks in <channel>. <channel> 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 [<channel>] [<nick> ...]
|
||||
If you have the #channel,op capability, this will give all the <nick>s you provide ops. If you don't provide any <nick>s, this will op you. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
part [<channel>] [<reason>]
|
||||
Tells the bot to part the list of channels you give it. <channel> is only necessary if you want the bot to part a channel other than the current channel. If <reason> 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 [<channel>] [<hostmask|--all>]
|
||||
Unbans <hostmask> on <channel>. If <hostmask> is not given, unbans any hostmask currently banned on <channel> that matches your current hostmask. Especially useful for unbanning yourself when you get unexpectedly (or accidentally) banned from the channel. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
unmoderate [<channel>]
|
||||
Sets -m on <channel>, making it so everyone can send messages to the channel. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
voice [<channel>] [<nick> ...]
|
||||
If you have the #channel,voice capability, this will voice all the <nick>s you provide. If you don't provide any <nick>s, this will voice you. <channel> 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.
|
||||
|
@ -1 +0,0 @@
|
||||
This plugin automatically logs the channels where the bot is.
|
90
plugins/ChannelLogger/README.rst
Normal file
90
plugins/ChannelLogger/README.rst
Normal file
@ -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.
|
||||
|
@ -1 +0,0 @@
|
||||
This plugin keeps stats of the channel and returns them with the command channelstats.
|
49
plugins/ChannelStats/README.rst
Normal file
49
plugins/ChannelStats/README.rst
Normal file
@ -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 [<channel>]
|
||||
Returns the statistics for <channel>. <channel> is only necessary if the message isn't sent on the channel itself.
|
||||
|
||||
rank [<channel>] <stat expression>
|
||||
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 [<channel>] [<name>]
|
||||
Returns the statistics for <name> on <channel>. <channel> is only necessary if the message isn't sent on the channel itself. If <name> 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.
|
||||
|
@ -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.
|
82
plugins/Conditional/README.rst
Normal file
82
plugins/Conditional/README.rst
Normal file
@ -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 <cond1> [<cond2> ... <condN>]
|
||||
Returns true if all conditions supplied evaluate to true.
|
||||
|
||||
ceq <item1> <item2>
|
||||
Does a string comparison on <item1> and <item2>. Returns true if they are equal.
|
||||
|
||||
cerror <testcommand>
|
||||
Runs <testcommand> and returns true if it raises an error; false otherwise.
|
||||
|
||||
cif <condition> <ifcommand> <elsecommand>
|
||||
Runs <ifcommand> if <condition> evaluates to true, runs <elsecommand> if it evaluates to false. Use other logical operators defined in this plugin and command nesting to your advantage here.
|
||||
|
||||
cor <cond1> [<cond2> ... <condN>]
|
||||
Returns true if any one of conditions supplied evaluates to true.
|
||||
|
||||
cxor <cond1> [<cond2> ... <condN>]
|
||||
Returns true if only one of conditions supplied evaluates to true.
|
||||
|
||||
ge <item1> <item2>
|
||||
Does a string comparison on <item1> and <item2>. Returns true if <item1> is greater than or equal to <item2>.
|
||||
|
||||
gt <item1> <item2>
|
||||
Does a string comparison on <item1> and <item2>. Returns true if <item1> is greater than <item2>.
|
||||
|
||||
le <item1> <item2>
|
||||
Does a string comparison on <item1> and <item2>. Returns true if <item1> is less than or equal to <item2>.
|
||||
|
||||
lt <item1> <item2>
|
||||
Does a string comparison on <item1> and <item2>. Returns true if <item1> is less than <item2>.
|
||||
|
||||
match [--case-insensitive] <item1> <item2>
|
||||
Determines if <item1> is a substring of <item2>. Returns true if <item1> is contained in <item2>. Will only match case if --case-insensitive is not given.
|
||||
|
||||
nceq <item1> <item2>
|
||||
Does a numeric comparison on <item1> and <item2>. Returns true if they are equal.
|
||||
|
||||
ne <item1> <item2>
|
||||
Does a string comparison on <item1> and <item2>. Returns true if they are not equal.
|
||||
|
||||
nge <item1> <item2>
|
||||
Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is greater than or equal to <item2>.
|
||||
|
||||
ngt <item1> <item2>
|
||||
Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is greater than <item2>.
|
||||
|
||||
nle <item1> <item2>
|
||||
Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is less than or equal to <item2>.
|
||||
|
||||
nlt <item1> <item2>
|
||||
Does a numeric comparison on <item1> and <item2>. Returns true if <item1> is less than <item2>.
|
||||
|
||||
nne <item1> <item2>
|
||||
Does a numeric comparison on <item1> and <item2>. 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.
|
||||
|
@ -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
|
||||
|
65
plugins/Config/README.rst
Normal file
65
plugins/Config/README.rst
Normal file
@ -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 [<network>] [<channel>] <name> [<value>]
|
||||
If <value> is given, sets the channel configuration variable for <name> to <value> for <channel> on the <network>. Otherwise, returns the current channel configuration value of <name>. <channel> 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. <network> defaults to the current network.
|
||||
|
||||
config <name> [<value>]
|
||||
If <value> is given, sets the value of <name> to <value>. Otherwise, returns the current value of <name>. You may omit the leading "supybot." in the name if you so choose.
|
||||
|
||||
default <name>
|
||||
Returns the default value of the configuration variable <name>.
|
||||
|
||||
export <filename>
|
||||
Exports the public variables of your configuration to <filename>. 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 <name>
|
||||
Returns the description of the configuration variable <name>.
|
||||
|
||||
list <group>
|
||||
Returns the configuration variables available under the given configuration <group>. 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 [<network>] <name> [<value>]
|
||||
If <value> is given, sets the network configuration variable for <name> to <value> for <network>. Otherwise, returns the current network configuration value of <name>. <network> defaults to the current network.
|
||||
|
||||
reload takes no arguments
|
||||
Reloads the various configuration files (user database, channel database, registry, etc.).
|
||||
|
||||
reset channel [<network>] [<channel>] <name>
|
||||
Resets the channel-specific value of variable <name>, so that it will match the network-specific value (or the global one if the latter isn't set). <network> and <channel> default to the current network and channel.
|
||||
|
||||
reset network [<network>] [<channel>] <name>
|
||||
Resets the network-specific value of variable <name>, so that it will match the global. <network> defaults to the current network and channel.
|
||||
|
||||
search <word>
|
||||
Searches for <word> in the current configuration variables.
|
||||
|
||||
searchhelp <phrase>
|
||||
Searches for <phrase> in the help of current configuration variables.
|
||||
|
||||
searchvalues <word>
|
||||
Searches for <word> in the values of current configuration variables.
|
||||
|
||||
setdefault <name>
|
||||
Resets the configuration variable <name> 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.
|
||||
|
@ -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.
|
40
plugins/Ctcp/README.rst
Normal file
40
plugins/Ctcp/README.rst
Normal file
@ -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 [<channel>] [--nicks]
|
||||
Sends a CTCP VERSION to <channel>, 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.
|
||||
|
@ -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')
|
||||
|
@ -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. - <https://en.wikipedia.org/wiki/Eiffel_Tower>
|
50
plugins/DDG/README.rst
Normal file
50
plugins/DDG/README.rst
Normal file
@ -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. - <https://en.wikipedia.org/wiki/Eiffel_Tower>
|
||||
|
||||
Commands
|
||||
--------
|
||||
search <text>
|
||||
Searches for <text> 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.
|
||||
|
@ -29,7 +29,7 @@
|
||||
###
|
||||
|
||||
"""
|
||||
DDG: Searches for results on DuckDuckGo.
|
||||
Searches for results on DuckDuckGo's web search.
|
||||
"""
|
||||
|
||||
import supybot
|
||||
|
@ -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. - <https://en.wikipedia.org/wiki/Eiffel_Tower>
|
||||
|
||||
"""
|
||||
threaded = True
|
||||
|
||||
@staticmethod
|
||||
|
@ -1,2 +0,0 @@
|
||||
This plugin provides debugging abilities for Supybot. It should not be
|
||||
loaded with a default installation.
|
55
plugins/Debug/README.rst
Normal file
55
plugins/Debug/README.rst
Normal file
@ -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 [<channel>]
|
||||
Returns the result of the channeldb converter.
|
||||
|
||||
collect [<times>]
|
||||
Does <times> gc collections, returning the number of objects collected each time. <times> defaults to 1.
|
||||
|
||||
environ takes no arguments
|
||||
Returns the environment of the supybot process.
|
||||
|
||||
eval <expression>
|
||||
Evaluates <expression> (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 <statement>
|
||||
Execs <code>. Returns success if it didn't raise any exceptions.
|
||||
|
||||
exn <exception name>
|
||||
Raises the exception matching <exception name>.
|
||||
|
||||
sendquote <raw IRC message>
|
||||
Sends (not queues) the raw IRC message given.
|
||||
|
||||
settrace [<filename>]
|
||||
Starts tracing function calls to <filename>. If <filename> is not given, sys.stdout is used. This causes much output.
|
||||
|
||||
simpleeval <expression>
|
||||
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.
|
||||
|
@ -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
|
||||
|
@ -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
|
55
plugins/Dict/README.rst
Normal file
55
plugins/Dict/README.rst
Normal file
@ -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 [<dictionary>] <word>
|
||||
Looks up the definition of <word> 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 <word> [<word> ...]
|
||||
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 '*'.
|
||||
|
@ -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
|
||||
|
@ -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.
|
52
plugins/Dunno/README.rst
Normal file
52
plugins/Dunno/README.rst
Normal file
@ -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
|
||||
'<x> 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: <x> is not a valid command.'
|
||||
messages with messages kept in a database, able to give more personable
|
||||
responses.
|
||||
|
||||
Commands
|
||||
--------
|
||||
add [<channel>] <text>
|
||||
Adds <text> to the dunno database for <channel>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
change [<channel>] <id> <regexp>
|
||||
Changes the dunno with id <id> according to the regular expression <regexp>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
get [<channel>] <id>
|
||||
Gets the dunno with id <id> from the dunno database for <channel>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
remove [<channel>] <id>
|
||||
Removes the dunno with id <id> from the dunno database for <channel>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
search [<channel>] [--{regexp,by} <value>] [<glob>]
|
||||
Searches for dunnos matching the criteria given.
|
||||
|
||||
stats [<channel>]
|
||||
Returns the number of dunnos in the database for <channel>. <channel> 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.
|
||||
|
@ -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
|
||||
'<x> is not a valid command'-like responses, use this plugin.
|
||||
Like Success does for the 'The operation succeeded.' reply.
|
||||
"""
|
||||
|
||||
import supybot
|
||||
|
@ -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.
|
96
plugins/Factoids/README.rst
Normal file
96
plugins/Factoids/README.rst
Normal file
@ -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 [<channel>] <oldkey> <newkey> [<number>]
|
||||
Adds a new key <newkey> for factoid associated with <oldkey>. <number> is only necessary if there's more than one factoid associated with <oldkey>. The same action can be accomplished by using the 'learn' function with a new key but an existing (verbatim) factoid content.
|
||||
|
||||
change [<channel>] <key> <number> <regexp>
|
||||
Changes the factoid #<number> associated with <key> according to <regexp>.
|
||||
|
||||
forget [<channel>] <key> [<number>|*]
|
||||
Removes a key-fact relationship for key <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 <key>. If as a result, the key (factoid) remains without any relationships to a factoid (key), it shall be removed from the database. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
info [<channel>] <key>
|
||||
Gives information about the factoid(s) associated with <key>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
learn [<channel>] <key> is <value>
|
||||
Associates <key> with <value>. <channel> 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 [<channel>] <key>
|
||||
Locks the factoid(s) associated with <key> so that they cannot be removed or added to. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
random [<channel>]
|
||||
Returns random factoids from the database for <channel>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
rank [<channel>] [--plain] [--alpha] [<number>]
|
||||
Returns a list of top-ranked factoid keys, sorted by usage count (rank). If <number> 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. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
search [<channel>] [--values] [--regexp <value>] [--author <username>] [<glob> ...]
|
||||
Searches the keyspace for keys matching <glob>. 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 [<channel>] <key>
|
||||
Unlocks the factoid(s) associated with <key> so that they can be removed or added to. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
whatis [<channel>] [--raw] <key> [<number>]
|
||||
Looks up the value of <key> 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. <channel> 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 <key> is <value>. 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.
|
||||
|
@ -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").
|
56
plugins/Fediverse/README.rst
Normal file
56
plugins/Fediverse/README.rst
Normal file
@ -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 <url>
|
||||
Shows the content of the status at <url>.
|
||||
|
||||
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.
|
||||
|
@ -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
|
||||
|
@ -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 :)
|
117
plugins/Filter/README.rst
Normal file
117
plugins/Filter/README.rst
Normal file
@ -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 <plugin-Format>` 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 <text>
|
||||
Returns <text> as if an AOL user had said it.
|
||||
|
||||
binary <text>
|
||||
Returns the binary representation of <text>.
|
||||
|
||||
caps <text>
|
||||
EVERYONE LOVES CAPS LOCK.
|
||||
|
||||
capwords <text>
|
||||
Capitalises the first letter of each word.
|
||||
|
||||
colorize <text>
|
||||
Returns <text> with each character randomly colorized.
|
||||
|
||||
gnu <text>
|
||||
Returns <text> as GNU/RMS would say it.
|
||||
|
||||
hebrew <text>
|
||||
Removes all the vowels from <text>. (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 <text>
|
||||
Returns a hexstring from the given string; a hexstring is a string composed of the hexadecimal value of each character in the string
|
||||
|
||||
jeffk <text>
|
||||
Returns <text> as if JeffK had said it himself.
|
||||
|
||||
leet <text>
|
||||
Returns the l33tspeak version of <text>
|
||||
|
||||
morse <text>
|
||||
Gives the Morse code equivalent of a given string.
|
||||
|
||||
outfilter [<channel>] [<command>]
|
||||
Sets the outFilter of this plugin to be <command>. If no command is given, unsets the outFilter. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
rainbow <text>
|
||||
Returns <text> colorized like a rainbow.
|
||||
|
||||
reverse <text>
|
||||
Reverses <text>.
|
||||
|
||||
rot13 <text>
|
||||
Rotates <text> 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 <text>
|
||||
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 <text>
|
||||
Returns <text> with each word longer than supybot.plugins.Filter.shrink.minimum being shrunken (i.e., like "internationalization" becomes "i18n").
|
||||
|
||||
spellit <text>
|
||||
Returns <text>, phonetically spelled out.
|
||||
|
||||
squish <text>
|
||||
Removes all the spaces from <text>.
|
||||
|
||||
stripcolor <text>
|
||||
Returns <text> stripped of all color codes.
|
||||
|
||||
supa1337 <text>
|
||||
Replies with an especially k-rad translation of <text>.
|
||||
|
||||
unbinary <text>
|
||||
Returns the character representation of binary <text>. Assumes ASCII, 8 digits per character.
|
||||
|
||||
undup <text>
|
||||
Returns <text>, with all consecutive duplicated letters removed.
|
||||
|
||||
unhexlify <hexstring>
|
||||
Returns the string corresponding to <hexstring>. Obviously, <hexstring> must be a string of hexadecimal digits.
|
||||
|
||||
uniud <text>
|
||||
Returns <text> rotated 180 degrees. Only really works for ASCII printable characters.
|
||||
|
||||
unmorse <Morse code text>
|
||||
Does the reverse of the morse command.
|
||||
|
||||
uwu <text>
|
||||
Returns <text> in uwu-speak.
|
||||
|
||||
vowelrot <text>
|
||||
Returns <text> 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.
|
||||
|
@ -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 <plugin-Format>` for format manipulation
|
||||
commands.
|
||||
"""
|
||||
|
||||
import supybot
|
||||
|
@ -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.
|
77
plugins/Format/README.rst
Normal file
77
plugins/Format/README.rst
Normal file
@ -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 <plugin-Filter>` to configure
|
||||
the output format for all commands.
|
||||
|
||||
Usage
|
||||
-----
|
||||
Provides some commands for formatting text, such as making text bold or
|
||||
capitalized.
|
||||
|
||||
Commands
|
||||
--------
|
||||
bold <text>
|
||||
Returns <text> bolded.
|
||||
|
||||
capitalize <text>
|
||||
Returns <text> capitalized.
|
||||
|
||||
color <foreground> [<background>] <text>
|
||||
Returns <text> with foreground color <foreground> and background color <background> (if given)
|
||||
|
||||
concat <string 1> <string 2>
|
||||
Concatenates two strings. Do keep in mind that this is *not* the same thing as join "", since if <string 2> contains spaces, they won't be removed by concat.
|
||||
|
||||
cut <size> <text>
|
||||
Cuts <text> down to <size> by chopping off the rightmost characters in excess of <size>. If <size> is a negative number, it chops that many characters off the end of <text>.
|
||||
|
||||
field <number> <text>
|
||||
Returns the <number>th space-separated field of <text>. I.e., if text is "foo bar baz" and <number> is 2, "bar" is returned.
|
||||
|
||||
format <format string> [<arg> ...]
|
||||
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 <separator> <string 1> [<string> ...]
|
||||
Joins all the arguments together with <separator>.
|
||||
|
||||
lower <text>
|
||||
Returns <text> lowercased.
|
||||
|
||||
replace <substring to translate> <substring to replace it with> <text>
|
||||
Replaces all non-overlapping occurrences of <substring to translate> with <substring to replace it with> in <text>.
|
||||
|
||||
repr <text>
|
||||
Returns <text> surrounded by double quotes.
|
||||
|
||||
reverse <text>
|
||||
Returns <text> in reverse-video.
|
||||
|
||||
stripformatting <text>
|
||||
Strips bold, underline, and colors from <text>.
|
||||
|
||||
title <text>
|
||||
Returns <text> titlecased.
|
||||
|
||||
translate <chars to translate> <chars to replace those with> <text>
|
||||
Replaces <chars to translate> with <chars to replace those with> in <text>. The first and second arguments must necessarily be the same length.
|
||||
|
||||
underline <text>
|
||||
Returns <text> underlined.
|
||||
|
||||
upper <text>
|
||||
Returns <text> 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.
|
||||
|
@ -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 <plugin-Filter>` to configure
|
||||
the output format for all commands.
|
||||
"""
|
||||
|
||||
import supybot
|
||||
|
@ -1 +0,0 @@
|
||||
Provides authentication based on GPG keys.
|
37
plugins/GPG/README.rst
Normal file
37
plugins/GPG/README.rst
Normal file
@ -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 <key id> <key server>
|
||||
Add a GPG key to your account.
|
||||
|
||||
key list takes no arguments
|
||||
List your GPG keys.
|
||||
|
||||
key remove <fingerprint>
|
||||
Remove a GPG key from your account.
|
||||
|
||||
signing auth <url>
|
||||
Check the GPG signature at the <url> 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.
|
||||
|
@ -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.
|
40
plugins/Games/README.rst
Normal file
40
plugins/Games/README.rst
Normal file
@ -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 <dice>d<sides>
|
||||
Rolls a die with <sides> number of sides <dice> times. For example, 2d6 will roll 2 six-sided dice; 10d10 will roll 10 ten-sided dice.
|
||||
|
||||
eightball [<question>]
|
||||
Ask a question and the answer shall be provided.
|
||||
|
||||
monologue [<channel>]
|
||||
Returns the number of consecutive lines you've sent in <channel> without being interrupted by someone else (i.e. how long your current 'monologue' is). <channel> 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.
|
||||
|
@ -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
|
||||
|
@ -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)
|
113
plugins/Google/README.rst
Normal file
113
plugins/Google/README.rst
Normal file
@ -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: <https://cloud.google.com/translate/v2/using_rest#language-params>`
|
||||
|
||||
Commands
|
||||
--------
|
||||
cache <url>
|
||||
Returns a link to the cached version of <url> if it is available.
|
||||
|
||||
calc <expression>
|
||||
Uses Google's calculator to calculate the value of <expression>.
|
||||
|
||||
fight <search string> <search string> [<search string> ...]
|
||||
Returns the results of each search, in order, from greatest number of results to least.
|
||||
|
||||
google <search> [--{filter,language} <value>]
|
||||
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] <search>
|
||||
Does a google search, but only returns the first result. If option --snippet is given, returns also the page text snippet.
|
||||
|
||||
phonebook <phone number>
|
||||
Looks <phone number> up on Google.
|
||||
|
||||
translate <source language> [to] <target language> <text>
|
||||
Returns <text> translated from <source language> into <target language>. <source language> and <target language> 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.
|
||||
|
@ -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: <https://cloud.google.com/translate/v2/using_rest#language-params>`
|
||||
"""
|
||||
threaded = True
|
||||
callBefore = ['Web']
|
||||
regexps = ['googleSnarfer']
|
||||
|
@ -1 +0,0 @@
|
||||
Provides hash and encryption related commands.
|
40
plugins/Hashes/README.rst
Normal file
40
plugins/Hashes/README.rst
Normal file
@ -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 <takes no arguments>
|
||||
Returns the list of available algorithms.
|
||||
|
||||
md5 <text>
|
||||
Returns the md5 hash of a given string.
|
||||
|
||||
mkhash <algorithm> <text>
|
||||
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 <text>
|
||||
Returns the SHA1 hash of a given string.
|
||||
|
||||
sha256 <text>
|
||||
Returns a SHA256 hash of the given string.
|
||||
|
||||
sha512 <text>
|
||||
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.
|
||||
|
@ -28,7 +28,7 @@
|
||||
###
|
||||
|
||||
"""
|
||||
Provides various hash-related commands.
|
||||
Provides various hash- and encryption-related commands.
|
||||
"""
|
||||
|
||||
import supybot
|
||||
|
@ -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.
|
79
plugins/Herald/README.rst
Normal file
79
plugins/Herald/README.rst
Normal file
@ -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 [<channel>] <user|nick> <msg>
|
||||
Sets the herald message for <user> (or the user <nick|hostmask> is currently identified or recognized as) to <msg>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
change [<channel>] [<user|nick>] <regexp>
|
||||
Changes the herald message for <user>, or the user <nick|hostmask> is currently identified or recognized as, according to <regexp>. If <user> is not given, defaults to the calling user. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
default [<channel>] [--remove|<msg>]
|
||||
If <msg> is given, sets the default herald to <msg>. A <msg> of "" will remove the default herald. If <msg> is not given, returns the current default herald. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
get [<channel>] [<user|nick>]
|
||||
Returns the current herald message for <user> (or the user <nick|hostmask> is currently identified or recognized as). If <user> is not given, defaults to the user giving the command. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
remove [<channel>] [<user|nick>]
|
||||
Removes the herald message set for <user>, or the user <nick|hostmask> is currently identified or recognized as. If <user> is not given, defaults to the user giving the command. <channel> 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.
|
||||
|
@ -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.
|
33
plugins/Internet/README.rst
Normal file
33
plugins/Internet/README.rst
Normal file
@ -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 <host|ip>
|
||||
Returns the ip of <host> or the reverse DNS hostname of <ip>.
|
||||
|
||||
hexip <ip>
|
||||
Returns the hexadecimal IP for that IP.
|
||||
|
||||
whois <domain>
|
||||
Returns WHOIS information on the registration of <domain>.
|
||||
|
||||
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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
95
plugins/Karma/README.rst
Normal file
95
plugins/Karma/README.rst
Normal file
@ -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 [<channel>] [<name>]
|
||||
Resets the karma of <name> to 0. If <name> is not given, resets everything.
|
||||
|
||||
dump [<channel>] <filename>
|
||||
Dumps the Karma database for <channel> to <filename> in the bot's data directory. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
karma [<channel>] [<thing> ...]
|
||||
Returns the karma of <thing>. If <thing> is not given, returns the top N karmas, where N is determined by the config variable supybot.plugins.Karma.rankingDisplay. If one <thing> is given, returns the details of its karma; if more than one <thing> is given, returns the total karma of each of the things. <channel> is only necessary if the message isn't sent on the channel itself.
|
||||
|
||||
load [<channel>] <filename>
|
||||
Loads the Karma database for <channel> from <filename> in the bot's data directory. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
most [<channel>] {increased,decreased,active}
|
||||
Returns the most increased, the most decreased, or the most active (the sum of increased and decreased) karma things. <channel> 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.
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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`.
|
56
plugins/Lart/README.rst
Normal file
56
plugins/Lart/README.rst
Normal file
@ -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 [<channel>] <text>
|
||||
Adds <text> to the lart database for <channel>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
change [<channel>] <id> <regexp>
|
||||
Changes the lart with id <id> according to the regular expression <regexp>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
get [<channel>] <id>
|
||||
Gets the lart with id <id> from the lart database for <channel>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
lart [<channel>] [<id>] <who|what> [for <reason>]
|
||||
Uses the Luser Attitude Readjustment Tool on <who|what> (for <reason>, if given). If <id> is given, uses that specific lart. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
remove [<channel>] <id>
|
||||
Removes the lart with id <id> from the lart database for <channel>. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
search [<channel>] [--{regexp,by} <value>] [<glob>]
|
||||
Searches for larts matching the criteria given.
|
||||
|
||||
stats [<channel>]
|
||||
Returns the number of larts in the database for <channel>. <channel> 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.
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -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.
|
82
plugins/Later/README.rst
Normal file
82
plugins/Later/README.rst
Normal file
@ -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 [<nick>]
|
||||
If <nick> is given, replies with what notes are waiting on <nick>, otherwise, replies with the nicks that have notes waiting for them.
|
||||
|
||||
remove <nick>
|
||||
Removes the notes waiting on <nick>.
|
||||
|
||||
tell <nick1[,nick2[,...]]> <text>
|
||||
Tells each <nickX> <text> the next time <nickX> is seen. <nickX> can contain wildcard characters, and the first matching nick will be given the note.
|
||||
|
||||
undo <nick>
|
||||
Removes the latest note you sent to <nick>.
|
||||
|
||||
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.
|
||||
|
@ -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)
|
||||
|
@ -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.
|
42
plugins/Limiter/README.rst
Normal file
42
plugins/Limiter/README.rst
Normal file
@ -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.
|
||||
|
@ -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
|
||||
|
51
plugins/LogToIrc/README.rst
Normal file
51
plugins/LogToIrc/README.rst
Normal file
@ -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.
|
||||
|
@ -1 +0,0 @@
|
||||
This plugin provides a calculator, converter, a list of units and other useful math functions.
|
42
plugins/Math/README.rst
Normal file
42
plugins/Math/README.rst
Normal file
@ -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 <fromBase> [<toBase>] <number>
|
||||
Converts <number> from base <fromBase> to base <toBase>. If <toBase> is left out, it converts to decimal.
|
||||
|
||||
calc <math expression>
|
||||
Returns the value of the evaluated <math expression>. 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 [<number>] <unit> to <other unit>
|
||||
Converts from <unit> to <other unit>. If number isn't given, it defaults to 1. For unit information, see 'units' command.
|
||||
|
||||
icalc <math expression>
|
||||
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 <rpn math expression>
|
||||
Returns the value of an RPN expression.
|
||||
|
||||
units [<type>]
|
||||
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.
|
||||
|
@ -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
|
||||
|
@ -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/
|
96
plugins/MessageParser/README.rst
Normal file
96
plugins/MessageParser/README.rst
Normal file
@ -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 [<channel>|global] <regexp> <action>
|
||||
Associates <regexp> with <action>. <channel> 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 [<channel>|global] [--id] <regexp>
|
||||
Display information about <regexp> in the triggers database. <channel> 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 [<channel>|global]
|
||||
Lists regexps present in the triggers database. <channel> is only necessary if the message isn't sent in the channel itself. Regexp ID listed in parentheses.
|
||||
|
||||
lock [<channel>|global] <regexp>
|
||||
Locks the <regexp> so that it cannot be removed or overwritten to. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
rank [<channel>|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. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
remove [<channel>|global] [--id] <regexp>]
|
||||
Removes the trigger for <regexp> from the triggers database. <channel> 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 [<channel>|global] [--id] <regexp>
|
||||
Looks up the value of <regexp> in the triggers database. <channel> 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 [<channel>|global] <regexp>
|
||||
Unlocks the entry associated with <regexp> so that it can be removed or overwritten. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
vacuum [<channel>|global]
|
||||
Vacuums the database for <channel>. See SQLite vacuum doc here: http://www.sqlite.org/lang_vacuum.html <channel> 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.
|
||||
|
@ -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
|
||||
|
84
plugins/Misc/README.rst
Normal file
84
plugins/Misc/README.rst
Normal file
@ -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 <string>
|
||||
Searches for <string> 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 [<channel>] <beginning> [--match-case]
|
||||
Returns the nick of someone on the channel whose nick begins with the given <beginning>. <channel> defaults to the current channel.
|
||||
|
||||
help [<plugin>] [<command>]
|
||||
This command gives a useful description of what <command> does. <plugin> 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} <value>] [--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] [<plugin>]
|
||||
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 [<nick>]
|
||||
If the last command was truncated due to IRC message length limitations, returns the next chunk of the result of the last command. If <nick> is given, it takes the continuation of the last command from <nick> instead of the person sending this message.
|
||||
|
||||
noticetell <nick> <text>
|
||||
Tells the <nick> whatever <text> 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 <nick> <text>
|
||||
Tells the <nick> whatever <text> 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.
|
||||
|
@ -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 <reply> 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 <action> tests.` and everytime when someone calls for `test` the bot answers `* bot tests.`
|
76
plugins/MoobotFactoids/README.rst
Normal file
76
plugins/MoobotFactoids/README.rst
Normal file
@ -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 <reply> 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 <action> tests.`` and everytime when someone calls for
|
||||
``test`` the bot answers ``* bot tests.``
|
||||
|
||||
Commands
|
||||
--------
|
||||
factinfo [<channel>] <factoid key>
|
||||
Returns the various bits of info on the factoid for the given key. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
listauth [<channel>] <author name>
|
||||
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!). <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
listkeys [<channel>] <text>
|
||||
Lists the keys of the factoids whose key contains the provided text. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
listvalues [<channel>] <text>
|
||||
Lists the keys of the factoids whose value contains the provided text. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
literal [<channel>] <factoid key>
|
||||
Returns the literal factoid for the given factoid key. No parsing of the factoid value is done as it is with normal retrieval. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
lock [<channel>] <factoid key>
|
||||
Locks the factoid with the given factoid key. Requires that the user be registered and have created the factoid originally. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
most [<channel>] {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. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
random [<channel>]
|
||||
Displays a random factoid (along with its key) from the database. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
remove [<channel>] <factoid key>
|
||||
Deletes the factoid with the given key. <channel> is only necessary if the message isn't sent in the channel itself.
|
||||
|
||||
unlock [<channel>] <factoid key>
|
||||
Unlocks the factoid with the given factoid key. Requires that the user be registered and have locked the factoid. <channel> 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.
|
||||
|
@ -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 <reply> 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 <action> tests.`` and everytime when someone calls for
|
||||
``test`` the bot answers ``* bot tests.``
|
||||
"""
|
||||
callBefore = ['Dunno']
|
||||
def __init__(self, irc):
|
||||
self.db = MoobotDB()
|
||||
|
@ -1 +0,0 @@
|
||||
Allows connecting/disconnecting to networks, displaying the bot's latency to the server, and other useful network-related commands.
|
61
plugins/Network/README.rst
Normal file
61
plugins/Network/README.rst
Normal file
@ -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 [<network>]
|
||||
Returns the list of IRCv3 capabilities available on the network.
|
||||
|
||||
cmdall <command> [<arg> ...]
|
||||
Perform <command> (with its associated <arg>s) on all networks.
|
||||
|
||||
command <network> <command> [<arg> ...]
|
||||
Gives the bot <command> (with its associated <arg>s) on <network>.
|
||||
|
||||
connect [--nossl] <network> [<host[:port]>] [<password>]
|
||||
Connects to another network (which will be represented by the name provided in <network>) at <host:port>. 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 <network> [<quit message>]
|
||||
Disconnects from the network represented by the network <network>. If <quit message> is given, quits the network with the given quit message.
|
||||
|
||||
driver [<network>]
|
||||
Returns the current network driver for <network>. <network> is only necessary if the message isn't sent on the network to which this command is to apply.
|
||||
|
||||
latency [<network>]
|
||||
Returns the current latency to <network>. <network> 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 [<network>] [<quit message>]
|
||||
Disconnects and then reconnects to <network>. 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 [<network>]
|
||||
Returns the time duration since the connection was established.
|
||||
|
||||
whois [<network>] <nick>
|
||||
Returns the WHOIS response <network> gives for <nick>. <network> is only necessary if the network is different than the network the command is sent on.
|
||||
|
||||
whowas [<network>] <nick>
|
||||
Returns the WHOIS response <network> gives for <nick>. <network> 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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user