diff options
| author | 2019-10-08 14:03:09 +0100 | |
|---|---|---|
| committer | 2019-10-08 14:03:09 +0100 | |
| commit | 37e375c31f3d96e13576d13d11b26a2228c7cc34 (patch) | |
| tree | ccee2e668a191537b170b4d91403eb2fc56c249f /modules | |
| parent | send ducks 5-20 seconds after the message that triggered it (diff) | |
| signature | ||
allow !markovfor outside a channel when you share the channel with bitbot
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/markov.py | 4 |
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: |
