From e803bc1e0a526c87ec3d811e2db1790c5aabb03c Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 30 Sep 2004 05:28:24 +0000 Subject: [PATCH] Enforce the noExtraness of these commands. --- plugins/Status.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/Status.py b/plugins/Status.py index 594021f44..87669c41d 100644 --- a/plugins/Status.py +++ b/plugins/Status.py @@ -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