Actual hell
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/chen/trunk@38 32723744-9b23-0b4a-b1da-9b2e968f9461
This commit is contained in:
parent
3aa15bda11
commit
619c85f2aa
16
main.py
16
main.py
@ -266,8 +266,8 @@ class ChenBot(ClientXMPP):
|
|||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
cm = ctx.pop(0)
|
cm = ctx.pop(0)
|
||||||
if cm in self.muc_commands:
|
if cm in self.commands:
|
||||||
self.muc_commands[cm](msg, ctx, sender)
|
self.commands[cm](msg, ctx, sender)
|
||||||
|
|
||||||
async def muc_message(self, msg):
|
async def muc_message(self, msg):
|
||||||
"""Process a groupchat message."""
|
"""Process a groupchat message."""
|
||||||
@ -290,7 +290,7 @@ class ChenBot(ClientXMPP):
|
|||||||
if cm in self.muc_commands:
|
if cm in self.muc_commands:
|
||||||
self.muc_commands[cm](msg, ctx, sender)
|
self.muc_commands[cm](msg, ctx, sender)
|
||||||
|
|
||||||
@self.muc_word
|
@self.muc_command
|
||||||
def repo(msg, ctx, sender):
|
def repo(msg, ctx, sender):
|
||||||
if ctx:
|
if ctx:
|
||||||
return
|
return
|
||||||
@ -300,16 +300,6 @@ class ChenBot(ClientXMPP):
|
|||||||
mtype="groupchat",
|
mtype="groupchat",
|
||||||
)
|
)
|
||||||
|
|
||||||
@self.word
|
|
||||||
def repo(msg, ctx, sender):
|
|
||||||
if ctx:
|
|
||||||
return
|
|
||||||
bot.send_message(
|
|
||||||
mto=sender,
|
|
||||||
mbody=f"{msg.get_from().bare}: https://git.chaotic.ninja/usr/yakumo_izuru/chen",
|
|
||||||
mtype="chat",
|
|
||||||
)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read("config.ini")
|
config.read("config.ini")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user