diff options
| author | 2019-11-14 13:25:41 +0000 | |
|---|---|---|
| committer | 2019-11-14 13:25:41 +0000 | |
| commit | 2fb689494cbce1f931e823ea5e848586cac45f16 (patch) | |
| tree | 1b8dc546ccc28f98fbef29fe28298034a2a16ab2 | |
| parent | dont print full stacktrace when getting a url's title fails (diff) | |
| signature | ||
allow channels to be excluded from print_activity.py
| -rw-r--r-- | modules/print_activity.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/print_activity.py b/modules/print_activity.py index 67d7bff0..e2c953e9 100644 --- a/modules/print_activity.py +++ b/modules/print_activity.py @@ -8,8 +8,14 @@ from src import EventManager, ModuleManager, utils utils.BoolSetting("print-motd", "Set whether I print /motd")) @utils.export("botset", utils.BoolSetting("pretty-activity", "Whether or not to pretty print activity")) +@utils.export("channelset", utils.BoolSetting("print", + "Whether or not to print activity a channel to logs")) class Module(ModuleManager.BaseModule): def _print(self, event): + if (event["channel"] and + not event["channel"].get_setting("print", True)): + return + line = event["line"] if event["pretty"] and self.bot.get_setting("pretty-activity", False): line = event["pretty"] |
