Permalink
Browse files

Core/Players: Remove the mute from the DB when the timer expires.

  • Loading branch information...
1 parent ecc2362 commit 970009cb3b7e8a3ca0aa1107f70a76e9dc1ecb61 @Subv Subv committed Oct 10, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/server/game/Entities/Player/Player.cpp
@@ -1579,6 +1579,16 @@ void Player::Update(uint32 p_time)
// check every second
if (now > m_Last_tick + 1)
UpdateSoulboundTradeItems();
+
+ // If mute expired, remove it from the DB
+ if (GetSession()->m_muteTime && GetSession()->m_muteTime < now)
+ {
+ GetSession()->m_muteTime = 0;
+ PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME);
+ stmt->setInt64(0, 0); // Set the mute time to 0
+ stmt->setUInt32(1, GetSession()->GetAccountId());
+ LoginDatabase.Execute(stmt);
+ }
if (!m_timedquests.empty())
{

0 comments on commit 970009c

Please sign in to comment.