mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 19:52:54 +01:00
Added morehelps for some functions.
This commit is contained in:
parent
7bbb893662
commit
64c97a7c98
@ -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))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user