diff options
| author | 2020-01-20 13:19:47 +0000 | |
|---|---|---|
| committer | 2020-01-20 13:19:47 +0000 | |
| commit | 50be75a5e2868f369621912f4a722affd4680b72 (patch) | |
| tree | 97e8bee832e1ae3d830989333a663dec5bbb1374 /src | |
| parent | do all user-provided formatting as {VAR} formatting (diff) | |
| signature | ||
also do .format(**) when there's no `user` object
Diffstat (limited to 'src')
| -rw-r--r-- | src/core_modules/format_activity.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core_modules/format_activity.py b/src/core_modules/format_activity.py index 409e9b06..0a910c68 100644 --- a/src/core_modules/format_activity.py +++ b/src/core_modules/format_activity.py @@ -15,13 +15,14 @@ class Module(ModuleManager.BaseModule): if user: formatting["~NICK"] = user.nickname - line = line.format(**formatting) - minimal = minimal.format(**formatting) - for key, value in formatting.items(): - if key[0] == "~": - formatting[key] = self._color(value) - pretty = pretty.format(**formatting) + line = line.format(**formatting) + minimal = minimal.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, context=context, line=line, channel=channel, user=user, |
