also do .format(**) when there's no user object

This commit is contained in:
jesopo 2020-01-20 13:19:47 +00:00
parent 0eb92278cc
commit 50be75a5e2

View file

@ -15,13 +15,14 @@ class Module(ModuleManager.BaseModule):
if user: if user:
formatting["~NICK"] = user.nickname formatting["~NICK"] = user.nickname
line = line.format(**formatting)
minimal = minimal.format(**formatting)
for key, value in formatting.items(): line = line.format(**formatting)
if key[0] == "~": minimal = minimal.format(**formatting)
formatting[key] = self._color(value)
pretty = pretty.format(**formatting) for key, value in formatting.items():
if key[0] == "~":
formatting[key] = self._color(value)
pretty = pretty.format(**formatting)
self.events.on("formatted").on(type).call(server=server, self.events.on("formatted").on(type).call(server=server,
context=context, line=line, channel=channel, user=user, context=context, line=line, channel=channel, user=user,