From 37e375c31f3d96e13576d13d11b26a2228c7cc34 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 8 Oct 2019 14:03:09 +0100 Subject: [PATCH] allow !markovfor outside a channel when you share the channel with bitbot --- modules/markov.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/markov.py b/modules/markov.py index f2c3b6c4..1508ad99 100644 --- a/modules/markov.py +++ b/modules/markov.py @@ -97,12 +97,14 @@ class Module(ModuleManager.BaseModule): @utils.hook("received.command.markovfor") @utils.kwarg("min_args", 1) - @utils.kwarg("permission", "markovfor") @utils.kwarg("help", "Generate a markov chain for a given channel") @utils.kwarg("usage", " [first-word]") def markov_for(self, event): if event["args_split"][0] in event["server"].channels: channel = event["server"].channels.get(event["args_split"][0]) + if not channel.has_user(event["user"]): + event["check_assert"](utils.Check("permission", "markovfor")) + self._markov_for(channel, event["stdout"], event["stderr"], first_words=event["args_split"][1:]) else: