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\'.') self.write('Missing field \'chan\'.')
class Factoids(callbacks.Plugin, plugins.ChannelDBHandler): class Factoids(callbacks.Plugin, plugins.ChannelDBHandler):
"""Provides the ability to show Factoids."""
def __init__(self, irc): def __init__(self, irc):
callbacks.Plugin.__init__(self, irc) callbacks.Plugin.__init__(self, irc)
plugins.ChannelDBHandler.__init__(self) plugins.ChannelDBHandler.__init__(self)

View File

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

View File

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

View File

@ -49,6 +49,8 @@ _ = PluginInternationalization('Google')
import json import json
class Google(callbacks.PluginRegexp): 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 threaded = True
callBefore = ['Web'] callBefore = ['Web']
regexps = ['googleSnarfer'] 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 This plugin allows you to set welcome messages (heralds) to people who are recognized by the bot
when they join the channel. when they join a channel.

View File

@ -55,6 +55,8 @@ class HeraldDB(plugins.ChannelUserDB):
return L[0] return L[0]
class Herald(callbacks.Plugin): 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): def __init__(self, irc):
self.__parent = super(Herald, self) self.__parent = super(Herald, self)
self.__parent.__init__(irc) 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. This plugin provides commands to transform domains into IP addresses and IP addresses to domains.
It also provides command to search WHOIS information. This plugin can also return hexips. It can also search WHOIS information and return hexips.

View File

@ -40,7 +40,8 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Internet') _ = PluginInternationalization('Internet')
class Internet(callbacks.Plugin): 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 threaded = True
@internationalizeDocstring @internationalizeDocstring
def dns(self, irc, msg, args, host): def dns(self, irc, msg, args, host):

View File

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

View File

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

View File

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

View File

@ -76,6 +76,8 @@ class RegexpTimeout(Exception):
pass pass
class Misc(callbacks.Plugin): 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): def __init__(self, irc):
self.__parent = super(Misc, self) self.__parent = super(Misc, self)
self.__parent.__init__(irc) self.__parent.__init__(irc)

View File

@ -285,8 +285,8 @@ class SqliteMoobotDB(object):
MoobotDB = plugins.DB('MoobotFactoids', {'sqlite3': SqliteMoobotDB}) MoobotDB = plugins.DB('MoobotFactoids', {'sqlite3': SqliteMoobotDB})
class MoobotFactoids(callbacks.Plugin): class MoobotFactoids(callbacks.Plugin):
"""Add the help for "@help MoobotFactoids" here (assuming you don't implement a MoobotFactoids """An alternative to the Factoids plugin, this plugin keeps factoids in
command). This should describe *how* to use this plugin.""" your bot."""
callBefore = ['Dunno'] callBefore = ['Dunno']
def __init__(self, irc): def __init__(self, irc):
self.db = MoobotDB() 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') _ = PluginInternationalization('Network')
class Network(callbacks.Plugin): class Network(callbacks.Plugin):
"""Provides network-related commands, such as connecting to multiple networks
and checking latency to the server."""
_whois = {} _whois = {}
_latency = {} _latency = {}
def _getIrc(self, network): def _getIrc(self, network):

View File

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

View File

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

View File

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

View File

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

View File

@ -79,6 +79,8 @@ registerDefaultPlugin('addcapability', 'Admin')
registerDefaultPlugin('removecapability', 'Admin') registerDefaultPlugin('removecapability', 'Admin')
class Owner(callbacks.Plugin): 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 # This plugin must be first; its priority must be lowest; otherwise odd
# things will happen when adding callbacks. # things will happen when adding callbacks.
def __init__(self, irc=None): def __init__(self, irc=None):

View File

@ -36,6 +36,8 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Protector') _ = PluginInternationalization('Protector')
class Protector(callbacks.Plugin): 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): def isImmune(self, irc, msg):
if not ircutils.isUserHostmask(msg.prefix): if not ircutils.isUserHostmask(msg.prefix):
self.log.debug('%q is immune, it\'s a server.', msg) 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') _ = PluginInternationalization('Quote')
class Quote(plugins.ChannelIdDatabasePlugin): class Quote(plugins.ChannelIdDatabasePlugin):
"""This plugin allows you to add quotes to the database for a channel."""
@internationalizeDocstring @internationalizeDocstring
def random(self, irc, msg, args, channel): def random(self, irc, msg, args, channel):
"""[<channel>] """[<channel>]

View File

@ -223,7 +223,8 @@ class SqliteQuoteGrabsDB(object):
QuoteGrabsDB = plugins.DB('QuoteGrabs', {'sqlite3': SqliteQuoteGrabsDB}) QuoteGrabsDB = plugins.DB('QuoteGrabs', {'sqlite3': SqliteQuoteGrabsDB})
class QuoteGrabs(callbacks.Plugin): 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): def __init__(self, irc):
self.__parent = super(QuoteGrabs, self) self.__parent = super(QuoteGrabs, self)
self.__parent.__init__(irc) self.__parent.__init__(irc)

View File

@ -43,6 +43,7 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Relay') _ = PluginInternationalization('Relay')
class Relay(callbacks.Plugin): class Relay(callbacks.Plugin):
"""This plugin allows you to setup a relay between networks."""
noIgnore = True noIgnore = True
def __init__(self, irc): def __init__(self, irc):
self.__parent = super(Relay, self) 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. 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') filename = conf.supybot.directories.data.dirize('Scheduler.pickle')
class Scheduler(callbacks.Plugin): class Scheduler(callbacks.Plugin):
"""This plugin allows you to schedule commands to execute at a later time."""
def __init__(self, irc): def __init__(self, irc):
self.__parent = super(Scheduler, self) self.__parent = super(Scheduler, self)
self.__parent.__init__(irc) 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') anyfilename = conf.supybot.directories.data.dirize('Seen.any.db')
class Seen(callbacks.Plugin): 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 noIgnore = True
def __init__(self, irc): def __init__(self, irc):
self.__parent = super(Seen, self) self.__parent = super(Seen, self)

View File

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

View File

@ -44,6 +44,8 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Status') _ = PluginInternationalization('Status')
class Status(callbacks.Plugin): class Status(callbacks.Plugin):
"""This plugin allows you to view different bot statistics, for example,
uptime."""
def __init__(self, irc): def __init__(self, irc):
self.__parent = super(Status, self) self.__parent = super(Status, self)
self.__parent.__init__(irc) 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 import multiprocessing
class String(callbacks.Plugin): class String(callbacks.Plugin):
"""Provides useful commands for manipulating characters and strings."""
@internationalizeDocstring @internationalizeDocstring
def ord(self, irc, msg, args, letter): def ord(self, irc, msg, args, letter):
"""<letter> """<letter>

View File

@ -64,6 +64,7 @@ except ImportError:
tzlocal = None tzlocal = None
class Time(callbacks.Plugin): class Time(callbacks.Plugin):
"""This plugin allows you to use different time-related functions."""
@internationalizeDocstring @internationalizeDocstring
def seconds(self, irc, msg, args): def seconds(self, irc, msg, args):
"""[<years>y] [<weeks>w] [<days>d] [<hours>h] [<minutes>m] [<seconds>s] """[<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) db.set(tid, t)
class Todo(callbacks.Plugin): class Todo(callbacks.Plugin):
"""This plugin allows you to create your own personal to-do list on
the bot."""
def __init__(self, irc): def __init__(self, irc):
self.__parent = super(Todo, self) self.__parent = super(Todo, self)
self.__parent.__init__(irc) self.__parent.__init__(irc)

View File

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

View File

@ -62,6 +62,8 @@ class DbiUrlDB(plugins.DbiChannelDB):
URLDB = plugins.DB('URL', {'flat': DbiUrlDB}) URLDB = plugins.DB('URL', {'flat': DbiUrlDB})
class URL(callbacks.Plugin): 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): def __init__(self, irc):
self.__parent = super(URL, self) self.__parent = super(URL, self)
self.__parent.__init__(irc) self.__parent.__init__(irc)

View File

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

View File

@ -44,6 +44,9 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('User') _ = PluginInternationalization('User')
class User(callbacks.Plugin): 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=' '): def _checkNotChannel(self, irc, msg, password=' '):
if password and irc.isChannel(msg.args[0]): if password and irc.isChannel(msg.args[0]):
raise callbacks.Error(conf.supybot.replies.requiresPrivacy()) 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') _ = PluginInternationalization('Utilities')
class Utilities(callbacks.Plugin): class Utilities(callbacks.Plugin):
"""Provides useful commands for bot scripting / command nesting."""
# Yes, I really do mean "requires no arguments" below. "takes no # Yes, I really do mean "requires no arguments" below. "takes no
# arguments" would probably lead people to think it was a useless command. # arguments" would probably lead people to think it was a useless command.
@internationalizeDocstring @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 return tracer
class Debug(callbacks.Privmsg): class Debug(callbacks.Privmsg):
"""This plugin provides debugging abilities for Supybot. It
should not be loaded with a default installation."""
capability = 'owner' capability = 'owner'
def __init__(self, irc): def __init__(self, irc):
# Setup exec command. # Setup exec command.