From a883df8cc47bd1afd4d0782f17b218c6b0799f0d Mon Sep 17 00:00:00 2001 From: nemesis Date: Fri, 27 Mar 2020 13:56:31 +0100 Subject: [PATCH] =?UTF-8?q?correction=20@room=20envoi=20msg=20en=20salon?= =?UTF-8?q?=20priv=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- asmodee.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/asmodee.py b/asmodee.py index adaa5de..39d9d01 100755 --- a/asmodee.py +++ b/asmodee.py @@ -296,8 +296,11 @@ class Parser: #Pour parser la ligne de commande def msg(room,msg,sender,content=False): try: - lmod = modos[room.room_id] - if (sender not in admins and sender not in lmod): + try: + lmod = modos[room.room_id] + if (sender not in admins and sender not in lmod): + msg = msg.replace('@room', 'tout le monde') + except: msg = msg.replace('@room', 'tout le monde') if content: bot.client.api.send_message_event(room.room_id, 'm.room.message', msg, None, None) @@ -1810,8 +1813,6 @@ def bienvenue(event): # Affichage d'un message d'accueil aux nouveaux venus @not_myself def addmails(room,event): # Abonnements mail aux messages - global modules - global modos try: rmod = modules[room.room_id, 'mails'] except: