 +		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);

+	return 1;
+      }
+    }
+
+   if (!strstr (room->name, "groupe_")) {
+     // Cas des chans de groupe
+     n = snprintf(query, sizeof(query) - 1, "select id from perso "
+ 		 "where groupe = '%s' and replace(nom, ' ', '_') = '%s'",
+ 		 room->name+7, user->user);
+
+     log_debug(NAME, "[%s] query is {%s}, n is %d",
+ 	      FZONE, query, n);
+
+     if (n < sizeof(query) && query_ok(room->master->sql, query)) {
+       log_debug(NAME, "[%s] Is `%s`? >%s< - Yes", room->name, FZONE, jid_full(user));
+       return 1;
+   }
+    
+    // Ne devrait pas arriver
+    if (!strcmp(room->name, "sso")) return 1;
