diff options
author | Tim Cooper <tim.cooper@layeh.com> | 2015-11-24 14:49:29 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2015-11-24 21:30:02 +0300 |
commit | 0b0c074ddaa3eeff810c6047a3e671aa0c48fda4 (patch) | |
tree | cc5ac3e6703277fdf78f82126c2ef11382ce572d | |
parent | 0214948de478047392ab84ae5840d0df04e75dda (diff) |
Allow users with Write permission to bypass channel user limits
Fixes mumble-voip/mumble#1920
-rw-r--r-- | src/murmur/Messages.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/murmur/Messages.cpp b/src/murmur/Messages.cpp index 957eebe5c..17591d321 100644 --- a/src/murmur/Messages.cpp +++ b/src/murmur/Messages.cpp @@ -520,14 +520,16 @@ void Server::msgUserState(ServerUser *uSource, MumbleProto::UserState &msg) { PERM_DENIED(pDstServerUser, c, ChanACL::Enter); return; } - if (c->uiMaxUsers) { - if (static_cast<unsigned int>(c->qlUsers.count()) >= c->uiMaxUsers) { + if (! hasPermission(uSource, c, ChanACL::Write)) { + if (c->uiMaxUsers) { + if (static_cast<unsigned int>(c->qlUsers.count()) >= c->uiMaxUsers) { + PERM_DENIED_FALLBACK(ChannelFull, 0x010201, QLatin1String("Channel is full")); + return; + } + } else if (iMaxUsersPerChannel && (c->qlUsers.count() >= iMaxUsersPerChannel)) { PERM_DENIED_FALLBACK(ChannelFull, 0x010201, QLatin1String("Channel is full")); return; } - } else if (iMaxUsersPerChannel && (c->qlUsers.count() >= iMaxUsersPerChannel)) { - PERM_DENIED_FALLBACK(ChannelFull, 0x010201, QLatin1String("Channel is full")); - return; } } |