mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Check if name is already in use before allowing a rename
This commit is contained in:
parent
a2426bf035
commit
d97a49ffd8
@ -830,6 +830,9 @@ bool Server::setInfo(int id, const QMap<int, QString> &setinfo) {
|
||||
QMap<int, QString> info = setinfo;
|
||||
|
||||
if (info.contains(ServerDB::User_Name)) {
|
||||
const QString &uname = info.value(ServerDB::User_Name);
|
||||
if (uname.isEmpty() || (getUserID(uname) >= 0))
|
||||
return false;
|
||||
qhUserIDCache.remove(qhUserNameCache.value(id));
|
||||
qhUserNameCache.remove(id);
|
||||
qhUserIDCache.remove(info.value(ServerDB::User_Name));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user