Added morehelps for some functions.

This commit is contained in:
Jeremy Fincher 2003-09-02 19:55:53 +00:00
parent 7bbb893662
commit 64c97a7c98

View File

@ -50,7 +50,10 @@ class OwnerCommands(privmsgs.CapabilityCheckingPrivmsg):
setattr(self.__class__, 'exec', self._exec) setattr(self.__class__, 'exec', self._exec)
def eval(self, irc, msg, args): def eval(self, irc, msg, args):
"""<string to be evaluated by the Python interpreter>""" """<expression>
Evaluates <expression> and returns its value.
"""
if conf.allowEval: if conf.allowEval:
s = privmsgs.getArgs(args) s = privmsgs.getArgs(args)
try: try:
@ -63,7 +66,10 @@ class OwnerCommands(privmsgs.CapabilityCheckingPrivmsg):
irc.error(msg, conf.replyEvalNotAllowed) irc.error(msg, conf.replyEvalNotAllowed)
def _exec(self, irc, msg, args): def _exec(self, irc, msg, args):
"""<code to exec>""" """<statement>
Execs <code>. Returns success if it didn't raise any exceptions.
"""
if conf.allowEval: if conf.allowEval:
s = privmsgs.getArgs(args) s = privmsgs.getArgs(args)
try: try:
@ -264,11 +270,17 @@ class OwnerCommands(privmsgs.CapabilityCheckingPrivmsg):
irc.error(msg, 'There was no callback %s' % name) irc.error(msg, 'There was no callback %s' % name)
def cvsup(self, irc, msg, args): def cvsup(self, irc, msg, args):
"""takes no arguments""" """takes no arguments
Returns the return code of 'cvs up'
"""
irc.reply(msg, str(os.system('cvs up'))) irc.reply(msg, str(os.system('cvs up')))
def say(self, irc, msg, args): def say(self, irc, msg, args):
"""<channel> <text>""" """<channel> <text>
Says <text> in <channel>
"""
(channel, text) = privmsgs.getArgs(args, needed=2) (channel, text) = privmsgs.getArgs(args, needed=2)
irc.queueMsg(ircmsgs.privmsg(channel, text)) irc.queueMsg(ircmsgs.privmsg(channel, text))