DrBotIRC, Facts: clean up some method header doc since it shows up in XML-RPC

This commit is contained in:
Brian S. Stephan 2012-03-30 11:14:31 -05:00
parent 4253c83694
commit 731aec8c0c
2 changed files with 19 additions and 7 deletions

View File

@ -40,7 +40,9 @@ class DrBotzoMethods:
def echo(self, message):
"""
Just reply to the client, for testing purposes.
Arguments: message - the message to echo
Keyword arguments:
message - the message to echo
"""
return message
@ -48,8 +50,10 @@ class DrBotzoMethods:
def say(self, target, message):
"""
Say a message in a channel/to a nick.
Arguments: target - the nick/channel to privmsg
message - the message to send
Keyword arguments:
target - the nick/channel to privmsg
message - the message to send
"""
self.irc.server.privmsg(target, message)
@ -58,9 +62,11 @@ class DrBotzoMethods:
def execute_module_method(self, modname, method, args):
"""
Execute the method (with arguments) of the specified module.
Arguments: modname - the loaded module to retrieve
method - the method to call from that module
args - the arguments to provide to the method as a pythonic tuple
Keyword arguments:
modname - the loaded module to retrieve
method - the method to call from that module
args - the arguments to provide to the method as a pythonic tuple
"""
for module in self.irc.modlist:

View File

@ -97,7 +97,13 @@ class Facts(Module):
return self.reply(connection, event, "sqlite error: " + str(e))
def _get_fact(self, category, search=""):
"""Get a fact in the given category from the database."""
"""
Get a fact in the given category from the database.
Keyword arguments:
category - the fact category to query
search - the optional regex to match against within that category
"""
try:
db = self.get_db()