Merge pull request #1530 from ZeldaZach/fix_1527
Minors Fixes for #1527
This commit is contained in:
commit
1409b97490
2 changed files with 30 additions and 29 deletions
|
@ -116,7 +116,7 @@ void TabMessage::processUserMessageEvent(const Event_UserMessage &event)
|
|||
soundEngine->playSound("private_message");
|
||||
if (settingsCache->getShowMessagePopup() && shouldShowSystemPopup(event))
|
||||
showSystemPopup(event);
|
||||
if (QString::fromStdString(event.sender_name()).simplified() == "Servatrice")
|
||||
if (QString::fromStdString(event.sender_name()).toLower().simplified() == "servatrice")
|
||||
sayEdit->setDisabled(true);
|
||||
|
||||
emit userEvent();
|
||||
|
|
|
@ -524,7 +524,9 @@ void ServerSocketInterface::deckDelDirHelper(int basePathId)
|
|||
void ServerSocketInterface::sendServerMessage(const QString userName, const QString message)
|
||||
{
|
||||
ServerSocketInterface *user = static_cast<ServerSocketInterface *>(server->getUsers().value(userName));
|
||||
if (user) {
|
||||
if (!user)
|
||||
return;
|
||||
|
||||
Event_UserMessage event;
|
||||
event.set_sender_name("Servatrice");
|
||||
event.set_receiver_name(userName.toStdString());
|
||||
|
@ -533,7 +535,6 @@ void ServerSocketInterface::sendServerMessage(const QString userName, const QStr
|
|||
user->sendProtocolItem(*se);
|
||||
delete se;
|
||||
}
|
||||
}
|
||||
|
||||
Response::ResponseCode ServerSocketInterface::cmdDeckDelDir(const Command_DeckDelDir &cmd, ResponseContainer & /*rc*/)
|
||||
{
|
||||
|
@ -849,7 +850,7 @@ Response::ResponseCode ServerSocketInterface::cmdBanFromServer(const Command_Ban
|
|||
QList<QString> moderatorList = server->getOnlineModeratorList();
|
||||
QListIterator<QString> modIterator(moderatorList);
|
||||
foreach(QString moderator, moderatorList) {
|
||||
QString notificationMessage = "A ban has been put in with the following details:";
|
||||
QString notificationMessage = "A ban has been added:";
|
||||
if (!userName.isEmpty())
|
||||
notificationMessage.append("\n Username: " + userName);
|
||||
if (!address.isEmpty())
|
||||
|
@ -895,7 +896,7 @@ Response::ResponseCode ServerSocketInterface::cmdRegisterAccount(const Command_R
|
|||
return Response::RespUsernameInvalid;
|
||||
}
|
||||
|
||||
if (userName.toLower() == "servatrice")
|
||||
if (userName.toLower().simplified() == "servatrice")
|
||||
return Response::RespUsernameInvalid;
|
||||
|
||||
if(sqlInterface->userExists(userName))
|
||||
|
|
Loading…
Reference in a new issue