mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
fix(Core/Chat): muteTime for players that were muted when offline (#7375)
This reverts commit 23beddb209314d6a6ef20c9e7ca7229ee7a1905b
This commit is contained in:
@@ -543,6 +543,17 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<AuthSession> authSes
|
||||
}
|
||||
}
|
||||
|
||||
//! Negative mutetime indicates amount of minutes to be muted effective on next login - which is now.
|
||||
if (account.MuteTime < 0)
|
||||
{
|
||||
account.MuteTime = time(nullptr) + llabs(account.MuteTime);
|
||||
|
||||
auto* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME_LOGIN);
|
||||
stmt->setInt64(0, account.MuteTime);
|
||||
stmt->setUInt32(1, account.Id);
|
||||
LoginDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
if (account.IsBanned)
|
||||
{
|
||||
SendAuthResponseError(AUTH_BANNED);
|
||||
|
||||
Reference in New Issue
Block a user