Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2020-12-10 23:59:07 +0300
committerBadlop <badlop@process-one.net>2022-09-16 17:34:58 +0300
commit2229e4c6dbd2edf042997c50deeab753411b9379 (patch)
treea08f171ab0d09dccc7b7ea7f279cb116cf2327b7
parentfac74f623e117fa2ce070acf20ad328dcb991ebc (diff)
Allow MUC service admins to bypass max_user_conferences limitation
-rw-r--r--src/mod_muc_room.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_muc_room.erl b/src/mod_muc_room.erl
index 32ea90b2b..79d7da928 100644
--- a/src/mod_muc_room.erl
+++ b/src/mod_muc_room.erl
@@ -2144,11 +2144,11 @@ add_new_user(From, Nick, Packet, StateData) ->
mod_muc_opt:max_user_conferences(StateData#state.server_host),
Collision = nick_collision(From, Nick, StateData),
IsSubscribeRequest = not is_record(Packet, presence),
- case {(ServiceAffiliation == owner orelse
- ((Affiliation == admin orelse Affiliation == owner)
+ case {ServiceAffiliation == owner orelse
+ ((((Affiliation == admin orelse Affiliation == owner)
andalso NUsers < MaxAdminUsers)
orelse NUsers < MaxUsers)
- andalso NConferences < MaxConferences,
+ andalso NConferences < MaxConferences),
Collision,
mod_muc:can_use_nick(StateData#state.server_host,
StateData#state.host, From, Nick),