correction @room envoi msg en salon privé

This commit is contained in:
nemesis 2020-03-27 13:56:31 +01:00
parent 90d53f8e0c
commit a883df8cc4

View file

@ -295,10 +295,13 @@ class Parser: #Pour parser la ligne de commande
return False return False
def msg(room,msg,sender,content=False): def msg(room,msg,sender,content=False):
try:
try: try:
lmod = modos[room.room_id] lmod = modos[room.room_id]
if (sender not in admins and sender not in lmod): if (sender not in admins and sender not in lmod):
msg = msg.replace('@room', 'tout le monde') msg = msg.replace('@room', 'tout le monde')
except:
msg = msg.replace('@room', 'tout le monde')
if content: if content:
bot.client.api.send_message_event(room.room_id, 'm.room.message', msg, None, None) bot.client.api.send_message_event(room.room_id, 'm.room.message', msg, None, None)
else: else:
@ -1810,8 +1813,6 @@ def bienvenue(event): # Affichage d'un message d'accueil aux nouveaux venus
@not_myself @not_myself
def addmails(room,event): # Abonnements mail aux messages def addmails(room,event): # Abonnements mail aux messages
global modules
global modos
try: try:
rmod = modules[room.room_id, 'mails'] rmod = modules[room.room_id, 'mails']
except: except: