allow !markovfor outside a channel when you share the channel with bitbot

This commit is contained in:
jesopo 2019-10-08 14:03:09 +01:00
parent 355689bb35
commit 37e375c31f

View file

@ -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: