mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-23 02:24:12 +01:00
Updated a docstring and made sure to lower all the channel logfile names.
This commit is contained in:
parent
e127a9575f
commit
aea2f421e8
@ -69,7 +69,8 @@ conf.registerChannelValue(conf.supybot.plugins.ChannelLogger,
|
|||||||
represent the timestamp used for the filename in rotated logs. When this
|
represent the timestamp used for the filename in rotated logs. When this
|
||||||
timestamp changes, the old logfiles will be closed and a new one started.
|
timestamp changes, the old logfiles will be closed and a new one started.
|
||||||
The format characters for the timestamp are in the time.strftime docs at
|
The format characters for the timestamp are in the time.strftime docs at
|
||||||
python.org."""))
|
python.org. In order for your logs to be rotated, you'll also have to
|
||||||
|
enable supybot.plugins.ChannelLogger.rotateLogs."""))
|
||||||
|
|
||||||
class FakeLog(object):
|
class FakeLog(object):
|
||||||
def flush(self):
|
def flush(self):
|
||||||
@ -137,6 +138,7 @@ class ChannelLogger(callbacks.Privmsg):
|
|||||||
del self.logs[channel]
|
del self.logs[channel]
|
||||||
|
|
||||||
def getLog(self, channel):
|
def getLog(self, channel):
|
||||||
|
channel = ircutils.toLower(channel)
|
||||||
self.checkLogNames()
|
self.checkLogNames()
|
||||||
if channel in self.logs:
|
if channel in self.logs:
|
||||||
return self.logs[channel]
|
return self.logs[channel]
|
||||||
@ -158,6 +160,7 @@ class ChannelLogger(callbacks.Privmsg):
|
|||||||
log.write(' ')
|
log.write(' ')
|
||||||
|
|
||||||
def doLog(self, channel, s):
|
def doLog(self, channel, s):
|
||||||
|
channel = ircutils.toLower(channel)
|
||||||
log = self.getLog(channel)
|
log = self.getLog(channel)
|
||||||
if self.registryValue('timestamp', channel):
|
if self.registryValue('timestamp', channel):
|
||||||
self.timestamp(log)
|
self.timestamp(log)
|
||||||
|
Loading…
Reference in New Issue
Block a user