Skip to content
Permalink
Browse files

Allow users with Write permission to bypass channel user limits

Fixes #1920
  • Loading branch information...
bontibon authored and mkrautz committed Nov 24, 2015
1 parent 0214948 commit 0b0c074ddaa3eeff810c6047a3e671aa0c48fda4
Showing with 7 additions and 5 deletions.
  1. +7 −5 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;
}
}

0 comments on commit 0b0c074

Please sign in to comment.
You can’t perform that action at this time.