From 1b3aa90df54970f772d0bb81b259f0260a4cb3cf Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 21 Jan 2020 16:40:18 +0000 Subject: [PATCH] don't enable !rainbow by default --- modules/rainbow.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/rainbow.py b/modules/rainbow.py index cb79e4d2..fc9bf440 100644 --- a/modules/rainbow.py +++ b/modules/rainbow.py @@ -16,11 +16,17 @@ COLORS = [ utils.consts.PURPLE ] +@utils.export("channelset", utils.BoolSetting("rainbow", + "Enable/disable allowing rainbowification of strings")) class Module(ModuleManager.BaseModule): @utils.hook("received.command.rainbow") @utils.kwarg("help", "Rainbowify a given string or the last message") @utils.kwarg("usage", "[string]") def rainbow(self, event): + if event["is_channel"] and not event["target"].get_setting( + "rainbow", False): + return + args = event["args"] if not args: args = event["target"].buffer.get()