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: