From 330ec02da9dc271381ea72210b99fefd6bc25be5 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 2 Jul 2020 19:01:39 +0800 Subject: [PATCH] 1 --- server/imserver/player.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/imserver/player.cc b/server/imserver/player.cc index 12171c6..46ca051 100644 --- a/server/imserver/player.cc +++ b/server/imserver/player.cc @@ -1226,18 +1226,20 @@ bool Player::CanAddFriend(const std::string& account_id) if (GetFriendById(account_id)) { return false; } - int target_channel = f8::ExtractGameIdFromAccountId(account_id); - int target_gameid = f8::ExtractChannelIdFromAccountId(account_id); - int self_channel = f8::ExtractGameIdFromAccountId(AccountId()); - int self_gameid = f8::ExtractChannelIdFromAccountId(AccountId()); + int target_channel = f8::ExtractChannelIdFromAccountId(account_id); + int target_gameid = f8::ExtractGameIdFromAccountId(account_id); + int self_channel = f8::ExtractChannelIdFromAccountId(AccountId()); + int self_gameid = f8::ExtractGameIdFromAccountId(AccountId()); if (target_gameid != self_gameid) { return false; } + #if 0 if (self_channel != 6000 && target_channel != 6000) { if (self_channel != target_channel) { return false; } } + #endif return true; }