diff options
| author | 2020-01-21 16:40:18 +0000 | |
|---|---|---|
| committer | 2020-01-21 16:47:19 +0000 | |
| commit | 1b3aa90df54970f772d0bb81b259f0260a4cb3cf (patch) | |
| tree | 7cc68003d315c5b3c0db17737b5a3261553c7066 /modules/rainbow.py | |
| parent | allow requesting utils.irc.color() to not add terminating code (diff) | |
| signature | ||
don't enable !rainbow by default
Diffstat (limited to 'modules/rainbow.py')
| -rw-r--r-- | modules/rainbow.py | 6 |
1 files changed, 6 insertions, 0 deletions
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() |
