From 868a6684af0de050ace6ae5d62778491d180c4de Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 23 Aug 2004 21:35:43 +0000 Subject: [PATCH] Removed logfile command, no one uses it and it's an information leak (channel logfiles). --- plugins/Status.py | 30 ------------------------------ test/test_Status.py | 1 - 2 files changed, 31 deletions(-) diff --git a/plugins/Status.py b/plugins/Status.py index 12f8f64f1..9007a7f0f 100644 --- a/plugins/Status.py +++ b/plugins/Status.py @@ -232,36 +232,6 @@ class Status(callbacks.Privmsg): """ irc.reply(irc.server) - def logfile(self, irc, msg, args): - """[] - - Returns the size of the various logfiles in use. If given a specific - logfile, returns only the size of that logfile. - """ - filenameArg = privmsgs.getArgs(args, required=0, optional=1) - if filenameArg: - if not filenameArg.endswith('.log'): - irc.error('That filename doesn\'t appear to be a log.') - return - filenameArg = os.path.basename(filenameArg) - ret = [] - dirname = conf.supybot.directories.log() - for (dirname,_,filenames) in os.walk(dirname): - if filenameArg: - if filenameArg in filenames: - filename = os.path.join(dirname, filenameArg) - stats = os.stat(filename) - ret.append('%s: %s' % (filename, stats.st_size)) - else: - for filename in filenames: - stats = os.stat(os.path.join(dirname, filename)) - ret.append('%s: %s' % (filename, stats.st_size)) - if ret: - ret.sort() - irc.reply(utils.commaAndify(ret)) - else: - irc.error('I couldn\'t find any logfiles.') - Class = Status diff --git a/test/test_Status.py b/test/test_Status.py index 338a6575c..81e9da28f 100644 --- a/test/test_Status.py +++ b/test/test_Status.py @@ -69,7 +69,6 @@ class StatusTestCase(PluginTestCase, PluginDocumentation): self.feedMsg('list') self.feedMsg('list Status') self.assertNotError('upkeep') - self.assertNotError('logfile') def testThreads(self): self.assertNotError('threads')