Add/improve help for Debug + plugins from F-W:

- Debug
- Factoids
- Format
- Games
- Google
- Herald
- Internet
- Karma
- Lart
- Math
- Misc
- MoobotFactoids
- Network
- News
- NickAuth
- Nickometer
- Note
- Owner
- Protector
- Quote
- QuoteGrabs
- Relay
- Scheduler
- Seen
- ShrinkUrl
- Status
- String
- Time
- Todo
- Topic
- URL
- Unix
- User
- Utilities
- Web
This commit is contained in:
James Lu 2014-11-30 12:07:41 -08:00
parent 24b1d2dc9c
commit a755238ef4
41 changed files with 66 additions and 15 deletions

View File

@ -188,6 +188,7 @@ class FactoidsCallback(httpserver.SupyHTTPServerCallback):
self.write('Missing field \'chan\'.')
class Factoids(callbacks.Plugin, plugins.ChannelDBHandler):
"""Provides the ability to show Factoids."""
def __init__(self, irc):
callbacks.Plugin.__init__(self, irc)
plugins.ChannelDBHandler.__init__(self)

View File

@ -38,6 +38,8 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Format')
class Format(callbacks.Plugin):
"""Provides some commands for formatting text, such as making text bold or
capitalized."""
@internationalizeDocstring
def bold(self, irc, msg, args, text):
"""<text>

View File

@ -42,6 +42,8 @@ _ = PluginInternationalization('Games')
class Games(callbacks.Plugin):
"""This plugin provides some small games like (Russian) roulette,
eightball, monologue, coin and dice."""
@internationalizeDocstring
def coin(self, irc, msg, args):
"""takes no arguments

View File

@ -49,6 +49,8 @@ _ = PluginInternationalization('Google')
import json
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."""
threaded = True
callBefore = ['Web']
regexps = ['googleSnarfer']

View File

@ -1,2 +1,2 @@
This plugin allows you to set welcoming messages (heralds) to people who are regognized by the bot
when they join the channel.
This plugin allows you to set welcome messages (heralds) to people who are recognized by the bot
when they join a channel.

View File

@ -55,6 +55,8 @@ class HeraldDB(plugins.ChannelUserDB):
return L[0]
class Herald(callbacks.Plugin):
"""This plugin allows you to set welcome messages (heralds) to people who
are recognized by the bot when they join a channel."""
def __init__(self, irc):
self.__parent = super(Herald, self)
self.__parent.__init__(irc)

View File

@ -1,2 +1,2 @@
This plugin provides commands to transform domain into IP address and IP address to domain.
It also provides command to search WHOIS information. This plugin can also return hexips.
This plugin provides commands to transform domains into IP addresses and IP addresses to domains.
It can also search WHOIS information and return hexips.

View File

@ -40,7 +40,8 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Internet')
class Internet(callbacks.Plugin):
"""Add the help for "@help Internet" here."""
"""Provides commands to query DNS, search WHOIS databases,
and convert IPs to hex."""
threaded = True
@internationalizeDocstring
def dns(self, irc, msg, args, host):

View File

@ -219,6 +219,7 @@ KarmaDB = plugins.DB('Karma',
{'sqlite3': SqliteKarmaDB})
class Karma(callbacks.Plugin):
"""Provides a simple tracker for setting Karma (thing++, thing--)."""
callBefore = ('Factoids', 'MoobotFactoids', 'Infobot')
def __init__(self, irc):
self.__parent = super(Karma, self)

View File

@ -36,6 +36,8 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Lart')
class Lart(plugins.ChannelIdDatabasePlugin):
"""Provides an implementation of the Luser Attitude Readjustment Tool
for users."""
_meRe = re.compile(r'\bme\b', re.I)
_myRe = re.compile(r'\bmy\b', re.I)
def _replaceFirstPerson(self, s, nick):

View File

@ -50,6 +50,8 @@ except ImportError:
baseArg = ('int', 'base', lambda i: i <= 36)
class Math(callbacks.Plugin):
"""Provides commands to work with math, such as a calculator and
a unit converter."""
@internationalizeDocstring
def base(self, irc, msg, args, frm, to, number):
"""<fromBase> [<toBase>] <number>

View File

@ -76,6 +76,8 @@ class RegexpTimeout(Exception):
pass
class Misc(callbacks.Plugin):
"""Miscellaneous commands to access Supybot core. This is a core Supybot
module that should not be removed!"""
def __init__(self, irc):
self.__parent = super(Misc, self)
self.__parent.__init__(irc)

View File

@ -285,8 +285,8 @@ class SqliteMoobotDB(object):
MoobotDB = plugins.DB('MoobotFactoids', {'sqlite3': SqliteMoobotDB})
class MoobotFactoids(callbacks.Plugin):
"""Add the help for "@help MoobotFactoids" here (assuming you don't implement a MoobotFactoids
command). This should describe *how* to use this plugin."""
"""An alternative to the Factoids plugin, this plugin keeps factoids in
your bot."""
callBefore = ['Dunno']
def __init__(self, irc):
self.db = MoobotDB()

View File

@ -1 +1 @@
Allows connecting, reconnecting, display the bot's latency between the server and other useful network-related commands.
Allows connecting/disconnecting to networks, displaying the bot's latency to the server, and other useful network-related commands.

View File

@ -43,6 +43,8 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Network')
class Network(callbacks.Plugin):
"""Provides network-related commands, such as connecting to multiple networks
and checking latency to the server."""
_whois = {}
_latency = {}
def _getIrc(self, network):

View File

@ -106,6 +106,7 @@ class DbiNewsDB(plugins.DbiChannelDB):
NewsDB = plugins.DB('News', {'flat': DbiNewsDB})
class News(callbacks.Plugin):
"""This plugin provides a means of maintaining News for a channel."""
def __init__(self, irc):
self.__parent = super(News, self)
self.__parent.__init__(irc)

View File

@ -44,7 +44,7 @@ _ = PluginInternationalization('NickAuth')
@internationalizeDocstring
class NickAuth(callbacks.Plugin):
"""Support authentication based on nicks and network services."""
"""Supports authentication based on nicks and network services."""
def __init__(self, irc):
super(NickAuth, self).__init__(irc)
self._requests = {}

View File

@ -78,6 +78,7 @@ def numberShifts(s):
return len(s)-1
class Nickometer(callbacks.Plugin):
"""Will tell you how lame a nick is by the command `@nickometer [nick]`."""
def punish(self, damage, reason):
self.log.debug('%s lameness points awarded: %s', damage, reason)
return damage

View File

@ -122,6 +122,7 @@ class DbiNoteDB(dbi.DB):
NoteDB = plugins.DB('Note', {'flat': DbiNoteDB})
class Note(callbacks.Plugin):
"""Allows you to send notes to other users."""
def __init__(self, irc):
self.__parent= super(Note, self)
self.__parent.__init__(irc)

View File

@ -79,6 +79,8 @@ registerDefaultPlugin('addcapability', 'Admin')
registerDefaultPlugin('removecapability', 'Admin')
class Owner(callbacks.Plugin):
"""Owner-only commands for core Supybot. This is a core Supybot module
that should not be removed!"""
# This plugin must be first; its priority must be lowest; otherwise odd
# things will happen when adding callbacks.
def __init__(self, irc=None):

View File

@ -36,6 +36,8 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Protector')
class Protector(callbacks.Plugin):
"""Prevents users from doing things they are not supposed to do on a channel,
even if they have +o or +h."""
def isImmune(self, irc, msg):
if not ircutils.isUserHostmask(msg.prefix):
self.log.debug('%q is immune, it\'s a server.', msg)

View File

@ -33,6 +33,7 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Quote')
class Quote(plugins.ChannelIdDatabasePlugin):
"""This plugin allows you to add quotes to the database for a channel."""
@internationalizeDocstring
def random(self, irc, msg, args, channel):
"""[<channel>]

View File

@ -223,7 +223,8 @@ class SqliteQuoteGrabsDB(object):
QuoteGrabsDB = plugins.DB('QuoteGrabs', {'sqlite3': SqliteQuoteGrabsDB})
class QuoteGrabs(callbacks.Plugin):
"""Add the help for "@help QuoteGrabs" here."""
"""Stores and displays quotes from channels. Quotes are stored randomly
and/or on user request."""
def __init__(self, irc):
self.__parent = super(QuoteGrabs, self)
self.__parent.__init__(irc)

View File

@ -43,6 +43,7 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Relay')
class Relay(callbacks.Plugin):
"""This plugin allows you to setup a relay between networks."""
noIgnore = True
def __init__(self, irc):
self.__parent = super(Relay, self)

View File

@ -1,2 +1,2 @@
This plugin allows you to scheduler commands to execute at a later time.
This plugin allows you to schedule commands to execute at a later time.
For example, `scheduler add [time seconds 30m] "utilities echo [status cpu]"` will schedule the command `cpu` to be sent to the channel in 30 minutes.

View File

@ -46,6 +46,7 @@ datadir = conf.supybot.directories.data()
filename = conf.supybot.directories.data.dirize('Scheduler.pickle')
class Scheduler(callbacks.Plugin):
"""This plugin allows you to schedule commands to execute at a later time."""
def __init__(self, irc):
self.__parent = super(Scheduler, self)
self.__parent.__init__(irc)

View File

@ -93,6 +93,8 @@ filename = conf.supybot.directories.data.dirize('Seen.db')
anyfilename = conf.supybot.directories.data.dirize('Seen.any.db')
class Seen(callbacks.Plugin):
"""This plugin allows you to see when and what someone last said and
what you missed since you left a channel."""
noIgnore = True
def __init__(self, irc):
self.__parent = super(Seen, self)

View File

@ -87,6 +87,8 @@ def retry(f):
return newf
class ShrinkUrl(callbacks.PluginRegexp):
"""This plugin features commands to shorten URLs through different services,
like tinyurl."""
regexps = ['shrinkSnarfer']
def __init__(self, irc):
self.__parent = super(ShrinkUrl, self)

View File

@ -44,6 +44,8 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Status')
class Status(callbacks.Plugin):
"""This plugin allows you to view different bot statistics, for example,
uptime."""
def __init__(self, irc):
self.__parent = super(Status, self)
self.__parent.__init__(irc)

View File

@ -1 +1 @@
Useful commands for manipulating characters strings.
Useful commands for manipulating characters and strings.

View File

@ -48,6 +48,7 @@ _ = PluginInternationalization('String')
import multiprocessing
class String(callbacks.Plugin):
"""Provides useful commands for manipulating characters and strings."""
@internationalizeDocstring
def ord(self, irc, msg, args, letter):
"""<letter>

View File

@ -64,6 +64,7 @@ except ImportError:
tzlocal = None
class Time(callbacks.Plugin):
"""This plugin allows you to use different time-related functions."""
@internationalizeDocstring
def seconds(self, irc, msg, args):
"""[<years>y] [<weeks>w] [<days>d] [<hours>h] [<minutes>m] [<seconds>s]

View File

@ -119,6 +119,8 @@ class FlatTodoDb(object):
db.set(tid, t)
class Todo(callbacks.Plugin):
"""This plugin allows you to create your own personal to-do list on
the bot."""
def __init__(self, irc):
self.__parent = super(Todo, self)
self.__parent.__init__(irc)

View File

@ -111,6 +111,8 @@ datadir = conf.supybot.directories.data()
filename = conf.supybot.directories.data.dirize('Topic.pickle')
class Topic(callbacks.Plugin):
"""This plugin allows you to use many topic-related functions,
such as Add, Undo, and Remove."""
def __init__(self, irc):
self.__parent = super(Topic, self)
self.__parent.__init__(irc)

View File

@ -62,6 +62,8 @@ class DbiUrlDB(plugins.DbiChannelDB):
URLDB = plugins.DB('URL', {'flat': DbiUrlDB})
class URL(callbacks.Plugin):
"""This plugin records how many URLs have been mentioned in
a channel and what the last URL was."""
def __init__(self, irc):
self.__parent = super(URL, self)
self.__parent.__init__(irc)

View File

@ -71,6 +71,7 @@ def pipeReadline(fd, timeout=2):
raise TimeoutError
class Unix(callbacks.Plugin):
"""Provides Utilities for Unix-like systems."""
threaded = True
@internationalizeDocstring
def errno(self, irc, msg, args, s):

View File

@ -44,6 +44,9 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('User')
class User(callbacks.Plugin):
"""Provides commands for dealing with users, such as registration and
authentication to the bot. This is a core Supybot module that should
not be removed!"""
def _checkNotChannel(self, irc, msg, password=' '):
if password and irc.isChannel(msg.args[0]):
raise callbacks.Error(conf.supybot.replies.requiresPrivacy())

View File

@ -1 +1 @@
Provides useful commands for bot scripting / commands nesting.
Provides useful commands for bot scripting / command nesting.

View File

@ -38,6 +38,7 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Utilities')
class Utilities(callbacks.Plugin):
"""Provides useful commands for bot scripting / command nesting."""
# Yes, I really do mean "requires no arguments" below. "takes no
# arguments" would probably lead people to think it was a useless command.
@internationalizeDocstring

View File

@ -1 +1 @@
This plugin allows you to view website information, like a title.
This plugin allows you to view website information, like the title of a page. Also provides a Snarfer for URLs.

View File

@ -66,6 +66,8 @@ def getTracer(fd):
return tracer
class Debug(callbacks.Privmsg):
"""This plugin provides debugging abilities for Supybot. It
should not be loaded with a default installation."""
capability = 'owner'
def __init__(self, irc):
# Setup exec command.