fix !part, add !join
This commit is contained in:
parent
1acd8158b9
commit
5239d54fbe
1 changed files with 10 additions and 2 deletions
|
@ -32,9 +32,17 @@ class Module(ModuleManager.BaseModule):
|
||||||
@utils.kwarg("permission", "part")
|
@utils.kwarg("permission", "part")
|
||||||
@utils.kwarg("require_mode", "high")
|
@utils.kwarg("require_mode", "high")
|
||||||
@utils.kwarg("require_access", "high,part")
|
@utils.kwarg("require_access", "high,part")
|
||||||
@utils.spec("!r~channel")
|
@utils.spec("!-privateonly !<channel>word")
|
||||||
|
@utils.spec("!-channelonly ?<channel>word")
|
||||||
def part(self, event):
|
def part(self, event):
|
||||||
event["server"].send_part(event["spec"][0].name)
|
event["server"].send_part(event["spec"][0] or event["target"].name)
|
||||||
|
|
||||||
|
@utils.hook("received.command.join")
|
||||||
|
@utils.kwarg("help", "Join a given channel")
|
||||||
|
@utils.kwarg("permission", "join")
|
||||||
|
@utils.spec("!<channel>word")
|
||||||
|
def join(self, event):
|
||||||
|
event["server"].send_join(event["spec"][0])
|
||||||
|
|
||||||
def _id_from_alias(self, alias):
|
def _id_from_alias(self, alias):
|
||||||
return self.bot.database.servers.get_by_alias(alias)
|
return self.bot.database.servers.get_by_alias(alias)
|
||||||
|
|
Loading…
Reference in a new issue