aboutsummaryrefslogtreecommitdiff
path: root/modules/markov.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markov.py')
-rw-r--r--modules/markov.py4
1 files changed, 3 insertions, 1 deletions
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", "<channel> [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: