Fixed documentation bugs.

This commit is contained in:
Jeremy Fincher 2003-09-06 18:29:44 +00:00
parent 4dfa786c89
commit 63403e6408
3 changed files with 22 additions and 3 deletions

View File

@ -99,11 +99,21 @@ class Debian(callbacks.Privmsg, PeriodicFileDownloader):
self.usePythonZegrep = False
def usepythonzegrep(self, irc, msg, args):
"""takes no arguments"""
"""takes no arguments
Mostly a debuggin tool; tells the module to use its own hand-rolled
zegrep in Python rather than an actual zegrep command. The Python
zegrep is about 50x slower than a real zegrep, so you probably don't
want to do this.
"""
self.usePythonZegrep = not self.usePythonZegrep
irc.reply(msg, conf.replySuccess)
def debfile(self, irc, msg, args):
"""<file>
Returns the packages in the Debian distribution that include <file>.
"""
self.getFile('Contents-i386.gz')
# Make sure it's anchored, make sure it doesn't have a leading slash
# (the filenames don't have leading slashes, and people may not know

View File

@ -59,7 +59,13 @@ _chanCap = ircdb.makeChannelCapability
class Enforcer(callbacks.Privmsg):
started = False
def startenforcer(self, irc, msg, args):
"""[<CHANSERV> <revenge>]"""
"""[<CHANSERV> <revenge>]
Starts the Enforcer plugin. <chanserv> is the nick for the chanserv
aspect of Services (it defaults to ChanServ). <revenge> is whether to
be *really* nasty to people who break the rules (it's often referred
to in other bots as 'bitch mode.') It defaults to True.
"""
self.topics = {}
(chanserv, revenge) = privmsgs.getArgs(args, needed=0, optional=2)
self.chanserv = chanserv or 'ChanServ'

View File

@ -223,7 +223,10 @@ class Google(callbacks.PrivmsgCommandAndRegexp):
irc.reply(msg, self.formatData(data))
def googlespell(self, irc, msg, args):
"<word>"
"""<word>
Returns Google's spelling recommendation for <word>.
"""
word = privmsgs.getArgs(args)
result = google.doSpellingSuggestion(word)
if result: