]> PatchyGit - angel.git/commitdiff
Remove commands from muc_message handler
authorKylie Czar <czar@kalli.st>
Sun, 16 May 2021 22:32:03 +0000 (19:32 -0300)
committerKylie Czar <czar@kalli.st>
Sun, 16 May 2021 22:32:03 +0000 (19:32 -0300)
main.py

diff --git a/main.py b/main.py
index 71b90a0..ff0affd 100644 (file)
--- a/main.py
+++ b/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__":