added a part command to admin.py.

This commit is contained in:
jesopo 2016-06-24 09:17:27 +01:00
parent 3880030136
commit d3a1c2db52
No known key found for this signature in database
GPG key ID: 0BBDEB2AEFCFFCB3

View file

@ -10,6 +10,10 @@ class Module(object):
).hook(self.raw, permission="raw", min_args=1, ).hook(self.raw, permission="raw", min_args=1,
help="Send a raw IRC line through the bot", help="Send a raw IRC line through the bot",
usage="<raw line>") usage="<raw line>")
bot.events.on("received").on("command").on("part"
).hook(self.part, permission="part", min_args=1,
help="Part from a channel",
usage="<#channel>")
def change_nickname(self, event): def change_nickname(self, event):
nickname = event["args_split"][0] nickname = event["args_split"][0]
@ -17,3 +21,6 @@ class Module(object):
def raw(self, event): def raw(self, event):
event["server"].send(event["args"]) event["server"].send(event["args"])
def part(self, event):
event["server"].send_part(event["args_split"][0])