don't utils.irc.parse_format in format_activity.py, so we don't have to use
raw_line in channel_log
This commit is contained in:
parent
380d91aba7
commit
ed3fc0e5d4
3 changed files with 4 additions and 4 deletions
|
@ -15,7 +15,7 @@ class Module(ModuleManager.BaseModule):
|
|||
if channel.get_setting("log", False):
|
||||
with self._log_file(str(event["server"]), str(channel)) as log:
|
||||
timestamp = datetime.datetime.now().strftime("%x %X")
|
||||
log.write("%s %s\n" % (timestamp, event["raw_line"]))
|
||||
log.write("%s %s\n" % (timestamp, event["line"]))
|
||||
|
||||
@utils.hook("formatted.message.channel")
|
||||
@utils.hook("formatted.notice.channel")
|
||||
|
|
|
@ -4,8 +4,7 @@ from src import EventManager, ModuleManager, utils
|
|||
class Module(ModuleManager.BaseModule):
|
||||
def _event(self, type, server, line, context, channel=None, user=None):
|
||||
self.events.on("formatted").on(type).call(server=server,
|
||||
context=context, line=utils.irc.parse_format(line), raw_line=line,
|
||||
channel=channel, user=user)
|
||||
context=context, line=line, channel=channel, user=user)
|
||||
|
||||
def _mode_symbols(self, user, channel, server):
|
||||
modes = channel.get_user_status(user)
|
||||
|
|
|
@ -19,4 +19,5 @@ class Module(ModuleManager.BaseModule):
|
|||
@utils.hook("formatted.motd")
|
||||
def formatted(self, event):
|
||||
self.bot.log.info("%s%s | %s", [
|
||||
str(event["server"]), event["context"] or "", event["line"]])
|
||||
str(event["server"]), event["context"] or "",
|
||||
utils.irc.parse_format(event["line"])])
|
||||
|
|
Loading…
Reference in a new issue