aboutsummaryrefslogtreecommitdiff
path: root/modules/print_activity.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/print_activity.py')
-rw-r--r--modules/print_activity.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/print_activity.py b/modules/print_activity.py
index 2a4ae77f..2852fe8e 100644
--- a/modules/print_activity.py
+++ b/modules/print_activity.py
@@ -6,11 +6,18 @@ from src import EventManager, ModuleManager, utils
@utils.export("botset",
utils.BoolSetting("print-motd", "Set whether I print /motd"))
+@utils.export("botset", utils.BoolSetting("pretty-activity",
+ "Whether or not to pretty print activity"))
class Module(ModuleManager.BaseModule):
def _print(self, event):
+ line = event["line"]
+ if ("pretty" in event and
+ self.bot.get_setting("pretty-activity", False)):
+ line = event["pretty"]
+
self.bot.log.info("%s%s | %s", [
str(event["server"]), event["context"] or "",
- utils.irc.parse_format(event["line"])])
+ utils.irc.parse_format(line)])
@utils.hook("formatted.message.channel")
@utils.hook("formatted.notice.channel")