 +		log_debug(NAME, "[%s] Enter in SSO_HACK for %s -> %s",
 +							FZONE, jid_full(user), room->name);
 +		
-+		n = snprintf(query, sizeof(query) - 1, "select statut from jabber_admin "
-+								 "where replace(nom, ' ', '_') = '%s'", user->user);
++		n = snprintf(query, sizeof(query) - 1, "select droits from joueur "
++								 "where login = '%s' and droits & 32 = 32", user->user);
 +		
 +		log_debug(NAME, "[%s] query is {%s}, n is %d",
 +							FZONE, query, n);

+    
+    if (!strcmp(room->name, "admin")) {
+      // Cas du chan des admins/modo
+      n = snprintf(query, sizeof(query) - 1, "select statut from jabber_admin "
+		   "where replace(nom, ' ', '_') = '%s'", user->user);
+      
+      log_debug(NAME, "[%s] query is {%s}, n is %d",
+		FZONE, query, n);

   if(g_hash_table_lookup(room->admin, ujid) != NULL )
     return 1;
   else if(g_hash_table_lookup(room->admin, user->server) != NULL )
@@ -232,6 +253,31 @@
     return 2;
   }
 
