diff options
author | Spp <spp@jorge.gr> | 2013-03-08 13:15:25 +0100 |
---|---|---|
committer | Spp <spp@jorge.gr> | 2013-03-08 13:15:25 +0100 |
commit | 377cfdb5602cec4ce13d9d50937836aa7e03c446 (patch) | |
tree | 87ff543f2f3b6324bdeef491344b97a7394d82aa /src/server/game/Handlers/MailHandler.cpp | |
parent | b4542c65048344019007a666a2bd35f9453d5664 (diff) |
Core/RBAC: Fix multiple permissions and remove multiple config options that are currently implementes by RBAC
- Remove config options: CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT, CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL, CONFIG_GM_LOG_TRADE, CONFIG_ALLOW_TWO_SIDE_ACCOUNTS, CONFIG_ALLOW_TWO_SIDE_WHO_LIST, CONFIG_ALLOW_GM_FRIEND, CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND, CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL
- Fix RBAC_PERM_SKIP_CHECK_CHAT_SPAM (Was checking spam for those that had the permission)
- Only check RBAC_PERM_TWO_SIDE_INTERACTION_CHAT for sender of whispers (Restores GM being able to whisper players)
- Only check RBAC_PERM_TWO_SIDE_INTERACTION_MAIL for sender
- Fix .ticket assign <Player>, with last RBAC change it was changed by mistake from Player to Account
Diffstat (limited to 'src/server/game/Handlers/MailHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/MailHandler.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index f3201401c8d..ac3471471a2 100644 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -117,7 +117,6 @@ void WorldSession::HandleSendMail(WorldPacket& recvData) uint8 mailsCount = 0; //do not allow to send to one player more than 100 mails uint8 receiverLevel = 0; uint32 receiverAccountId = 0; - bool canReceiveMailFromOtherFaction = false; if (receiver) { @@ -125,7 +124,6 @@ void WorldSession::HandleSendMail(WorldPacket& recvData) mailsCount = receiver->GetMailSize(); receiverLevel = receiver->getLevel(); receiverAccountId = receiver->GetSession()->GetAccountId(); - canReceiveMailFromOtherFaction = receiver->GetSession()->HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_MAIL); } else { @@ -152,7 +150,6 @@ void WorldSession::HandleSendMail(WorldPacket& recvData) } receiverAccountId = sObjectMgr->GetPlayerAccountIdByGUID(receiverGuid); - canReceiveMailFromOtherFaction = AccountMgr::HasPermission(receiverAccountId, RBAC_PERM_TWO_SIDE_INTERACTION_MAIL, realmID); } // do not allow to have more than 100 mails in mailbox.. mails count is in opcode uint8!!! - so max can be 255.. @@ -177,10 +174,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData) } } - if (!accountBound && player->GetTeam() != receiverTeam && // Sender and reciver are from different faction - (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL) || // Config not enabled - !HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_MAIL) || // Sender cant mail interact with the other faction - !canReceiveMailFromOtherFaction)) // Receiver cant mail interact with the other faction + if (!accountBound && player->GetTeam() != receiverTeam && !HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_MAIL)) { player->SendMailResult(0, MAIL_SEND, MAIL_ERR_NOT_YOUR_TEAM); return; @@ -257,7 +251,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData) if (items_count > 0 || money > 0) { - bool log = sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE) && HasPermission(RBAC_PERM_LOG_GM_TRADE); + bool log = HasPermission(RBAC_PERM_LOG_GM_TRADE); if (items_count > 0) { for (uint8 i = 0; i < items_count; ++i) @@ -466,7 +460,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket& recvData) uint32 sender_accId = 0; - if (HasPermission(RBAC_PERM_LOG_GM_TRADE) && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE)) + if (HasPermission(RBAC_PERM_LOG_GM_TRADE)) { std::string sender_name; if (receiver) |