mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Enforce the noExtraness of these commands.
This commit is contained in:
parent
1b611d75d9
commit
e803bc1e0a
@ -46,7 +46,7 @@ from itertools import islice, ifilter, imap
|
||||
import supybot.conf as conf
|
||||
import supybot.utils as utils
|
||||
import supybot.world as world
|
||||
import supybot.privmsgs as privmsgs
|
||||
from supybot.commands import wrap
|
||||
import supybot.registry as registry
|
||||
import supybot.callbacks as callbacks
|
||||
|
||||
@ -100,6 +100,7 @@ class Status(callbacks.Privmsg):
|
||||
if world.profiling:
|
||||
L.append('I am currently in code profiling mode.')
|
||||
irc.reply(' '.join(L))
|
||||
status = wrap(status, noExtra=True)
|
||||
|
||||
def threads(self, irc, msg, args):
|
||||
"""takes no arguments
|
||||
@ -113,6 +114,7 @@ class Status(callbacks.Privmsg):
|
||||
utils.nItems('thread', len(threads)), utils.be(len(threads)),
|
||||
utils.commaAndify(threads))
|
||||
irc.reply(s)
|
||||
threads = wrap(threads, noExtra=True)
|
||||
|
||||
def net(self, irc, msg, args):
|
||||
"""takes no arguments
|
||||
@ -129,6 +131,7 @@ class Status(callbacks.Privmsg):
|
||||
'I have been connected to %s for %s.' %
|
||||
(self.recvdMsgs, self.recvdBytes,
|
||||
self.sentMsgs, self.sentBytes, irc.server, timeElapsed))
|
||||
net = wrap(net, noExtra=True)
|
||||
|
||||
def cpu(self, irc, msg, args):
|
||||
"""takes no arguments
|
||||
@ -175,6 +178,7 @@ class Status(callbacks.Privmsg):
|
||||
except Exception:
|
||||
self.log.exception('Uncaught exception in cpu.memory:')
|
||||
irc.reply(utils.normalizeWhitespace(response))
|
||||
cpu = wrap(cpu, noExtra=True)
|
||||
|
||||
def cmd(self, irc, msg, args):
|
||||
"""takes no arguments
|
||||
@ -196,6 +200,7 @@ class Status(callbacks.Privmsg):
|
||||
utils.nItems('plugin', callbacksPrivmsg, 'command-based'),
|
||||
utils.nItems('command', world.commandsProcessed))
|
||||
irc.reply(s)
|
||||
cmd = wrap(cmd, noExtra=True)
|
||||
|
||||
def commands(self, irc, msg, args):
|
||||
"""takes no arguments
|
||||
@ -213,6 +218,7 @@ class Status(callbacks.Privmsg):
|
||||
commands = list(commands)
|
||||
commands.sort()
|
||||
irc.reply(utils.commaAndify(commands))
|
||||
commands = wrap(commands, noExtra=True)
|
||||
|
||||
def uptime(self, irc, msg, args):
|
||||
"""takes no arguments
|
||||
@ -222,6 +228,7 @@ class Status(callbacks.Privmsg):
|
||||
response = 'I have been running for %s.' % \
|
||||
utils.timeElapsed(time.time() - world.startedAt)
|
||||
irc.reply(response)
|
||||
uptime = wrap(uptime, noExtra=True)
|
||||
|
||||
def server(self, irc, msg, args):
|
||||
"""takes no arguments
|
||||
@ -229,6 +236,7 @@ class Status(callbacks.Privmsg):
|
||||
Returns the server the bot is on.
|
||||
"""
|
||||
irc.reply(irc.server)
|
||||
server = wrap(server, noExtra=True)
|
||||
|
||||
|
||||
Class = Status
|
||||
|
Loading…
Reference in New Issue
Block a user