From 34e6b9e9aec02af25bf22881d2ac3d478bf03b6f Mon Sep 17 00:00:00 2001 From: MichaelAChrisco Date: Fri, 7 Jun 2024 15:18:35 -0700 Subject: [PATCH] simplify --- mirror.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mirror.py b/mirror.py index 467c96b..a7058df 100644 --- a/mirror.py +++ b/mirror.py @@ -59,10 +59,11 @@ class EchoBot(slixmpp.ClientXMPP): """ if msg['type'] in ('chat', 'normal'): message = msg['body'] - if 'mesh_send:' in message: - msg.reply(f"Sent to Mesh: {message}").send() - if 'irc_send:' in message: - msg.reply(f"Sent to IRC {message}").send() + print(message) + if 'mesh_send' in message: + msg.reply(f"Sent to Mesh: {message.replace('mesh_send', '')}").send() + if 'irc_send' in message: + msg.reply(f"Sent to IRC: {message.replace('irc_send', '')}").send() if __name__ == '__main__':