|
|
@ -1411,13 +1411,13 @@ def bienvenue(event): # Affichage d'un message d'accueil aux nouveaux venus |
|
|
|
room.send_text("Bienvenue sur " + alias + ", " + nick + ". " + msg) |
|
|
|
|
|
|
|
def modo(room,event): # Definition d'un moderateur |
|
|
|
if (event['sender'] in admins): |
|
|
|
global modos |
|
|
|
global modos |
|
|
|
lmod = [] |
|
|
|
try: |
|
|
|
lmod = modos[room.room_id] |
|
|
|
except: |
|
|
|
lmod = [] |
|
|
|
try: |
|
|
|
lmod = modos[room.room_id] |
|
|
|
except: |
|
|
|
lmod = [] |
|
|
|
if (event['sender'] in admins or event['sender'] in lmod): |
|
|
|
args = event['content']['body'].split() |
|
|
|
args.pop(0) |
|
|
|
if (len(args) > 1 and args[0] == "add"): |
|
|
@ -1492,7 +1492,6 @@ def module(room,event): # Definition des modules d'un salon |
|
|
|
|
|
|
|
|
|
|
|
def invitations(room_id, state): # Reponse aux invitations |
|
|
|
global bot |
|
|
|
try: |
|
|
|
global bot |
|
|
|
bot.client.join_room(room_id) |
|
|
@ -1504,6 +1503,10 @@ def invitations(room_id, state): # Reponse aux invitations |
|
|
|
modules[room.room_id, 'quote'] = True |
|
|
|
if ('liste' in liste_mod): |
|
|
|
modules[room.room_id, 'liste'] = True |
|
|
|
global modos |
|
|
|
if (modos.get(room.room_id,True) or len(modos[room.room_id]) == 0): |
|
|
|
#modos[room.room_id] = |
|
|
|
print(state) |
|
|
|
time.sleep(2) |
|
|
|
del bot |
|
|
|
save() |
|
|
|