Remove commands from muc_message handler
git-svn-id: file:///srv/svn/repo/chen/trunk@8 32723744-9b23-0b4a-b1da-9b2e968f9461
This commit is contained in:
parent
5d6881bde4
commit
217f6c2b8c
14
main.py
14
main.py
@ -277,20 +277,18 @@ class AngelBot(ClientXMPP):
|
||||
if msg["mucnick"] == self.nick:
|
||||
return
|
||||
|
||||
ctx = msg["body"].strip().split()
|
||||
edit = "urn:xmpp:message-correct:0" in str(msg)
|
||||
if edit:
|
||||
return
|
||||
|
||||
try:
|
||||
if not msg["oob"]["url"]:
|
||||
if urls := self.get_urls(msg):
|
||||
await self.parse_urls(msg, urls, sender, mtype)
|
||||
except Exception:
|
||||
pass
|
||||
edit = "urn:xmpp:message-correct:0" in str(msg)
|
||||
cm = ctx.pop(0)
|
||||
if cm in self.muc_commands:
|
||||
if not edit:
|
||||
self.muc_commands[cm](msg, ctx, sender)
|
||||
else:
|
||||
self.s(msg, sender, mtype)
|
||||
|
||||
self.s(msg, sender, mtype)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
x
Reference in New Issue
Block a user