don't enable !rainbow by default

This commit is contained in:
jesopo 2020-01-21 16:40:18 +00:00
parent 369160d46f
commit 1b3aa90df5

View file

@ -16,11 +16,17 @@ COLORS = [
utils.consts.PURPLE utils.consts.PURPLE
] ]
@utils.export("channelset", utils.BoolSetting("rainbow",
"Enable/disable allowing rainbowification of strings"))
class Module(ModuleManager.BaseModule): class Module(ModuleManager.BaseModule):
@utils.hook("received.command.rainbow") @utils.hook("received.command.rainbow")
@utils.kwarg("help", "Rainbowify a given string or the last message") @utils.kwarg("help", "Rainbowify a given string or the last message")
@utils.kwarg("usage", "[string]") @utils.kwarg("usage", "[string]")
def rainbow(self, event): def rainbow(self, event):
if event["is_channel"] and not event["target"].get_setting(
"rainbow", False):
return
args = event["args"] args = event["args"]
if not args: if not args:
args = event["target"].buffer.get() args = event["target"].buffer.get()