1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666
|
/*
* GlobalLobbyClient.cpp, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#include "StdInc.h"
#include "GlobalLobbyClient.h"
#include "GlobalLobbyInviteWindow.h"
#include "GlobalLobbyLoginWindow.h"
#include "GlobalLobbyObserver.h"
#include "GlobalLobbyWindow.h"
#include "../CGameInfo.h"
#include "../CServerHandler.h"
#include "../gui/CGuiHandler.h"
#include "../gui/WindowHandler.h"
#include "../mainmenu/CMainMenu.h"
#include "../media/ISoundPlayer.h"
#include "../windows/InfoWindows.h"
#include "../../lib/CConfigHandler.h"
#include "../../lib/json/JsonUtils.h"
#include "../../lib/texts/CGeneralTextHandler.h"
#include "../../lib/texts/MetaString.h"
#include "../../lib/texts/TextOperations.h"
GlobalLobbyClient::GlobalLobbyClient()
{
auto customChannels = settings["lobby"]["languageRooms"].convertTo<std::vector<std::string>>();
if (customChannels.empty())
{
activeChannels.emplace_back("english");
if (CGI->generaltexth->getPreferredLanguage() != "english")
activeChannels.emplace_back(CGI->generaltexth->getPreferredLanguage());
}
else
{
activeChannels = customChannels;
}
}
void GlobalLobbyClient::addChannel(const std::string & channel)
{
activeChannels.emplace_back(channel);
auto lobbyWindowPtr = lobbyWindow.lock();
if(lobbyWindowPtr)
lobbyWindowPtr->refreshActiveChannels();
JsonNode toSend;
toSend["type"].String() = "requestChatHistory";
toSend["channelType"].String() = "global";
toSend["channelName"].String() = channel;
CSH->getGlobalLobby().sendMessage(toSend);
Settings languageRooms = settings.write["lobby"]["languageRooms"];
languageRooms->Vector().clear();
for (const auto & lang : activeChannels)
languageRooms->Vector().push_back(JsonNode(lang));
}
void GlobalLobbyClient::closeChannel(const std::string & channel)
{
vstd::erase(activeChannels, channel);
auto lobbyWindowPtr = lobbyWindow.lock();
if(lobbyWindowPtr)
lobbyWindowPtr->refreshActiveChannels();
Settings languageRooms = settings.write["lobby"]["languageRooms"];
languageRooms->Vector().clear();
for (const auto & lang : activeChannels)
languageRooms->Vector().push_back(JsonNode(lang));
}
GlobalLobbyClient::~GlobalLobbyClient() = default;
void GlobalLobbyClient::onPacketReceived(const std::shared_ptr<INetworkConnection> &, const std::vector<std::byte> & message)
{
boost::mutex::scoped_lock interfaceLock(GH.interfaceMutex);
JsonNode json(message.data(), message.size(), "<lobby network packet>");
if(json["type"].String() == "accountCreated")
return receiveAccountCreated(json);
if(json["type"].String() == "operationFailed")
return receiveOperationFailed(json);
if(json["type"].String() == "clientLoginSuccess")
return receiveClientLoginSuccess(json);
if(json["type"].String() == "chatHistory")
return receiveChatHistory(json);
if(json["type"].String() == "chatMessage")
return receiveChatMessage(json);
if(json["type"].String() == "activeAccounts")
return receiveActiveAccounts(json);
if(json["type"].String() == "activeGameRooms")
return receiveActiveGameRooms(json);
if(json["type"].String() == "joinRoomSuccess")
return receiveJoinRoomSuccess(json);
if(json["type"].String() == "inviteReceived")
return receiveInviteReceived(json);
if(json["type"].String() == "matchesHistory")
return receiveMatchesHistory(json);
logGlobal->error("Received unexpected message from lobby server: %s", json["type"].String());
}
void GlobalLobbyClient::receiveAccountCreated(const JsonNode & json)
{
auto loginWindowPtr = loginWindow.lock();
if(!loginWindowPtr || !GH.windows().topWindow<GlobalLobbyLoginWindow>())
throw std::runtime_error("lobby connection finished without active login window!");
{
setAccountID(json["accountID"].String());
setAccountDisplayName(json["displayName"].String());
setAccountCookie(json["accountCookie"].String());
}
sendClientLogin();
}
void GlobalLobbyClient::receiveOperationFailed(const JsonNode & json)
{
auto loginWindowPtr = loginWindow.lock();
if(loginWindowPtr)
loginWindowPtr->onConnectionFailed(json["reason"].String());
logGlobal->warn("Operation failed! Reason: %s", json["reason"].String());
// TODO: handle errors in lobby menu
}
void GlobalLobbyClient::receiveClientLoginSuccess(const JsonNode & json)
{
accountLoggedIn = true;
setAccountDisplayName(json["displayName"].String());
setAccountCookie(json["accountCookie"].String());
auto loginWindowPtr = loginWindow.lock();
if(!loginWindowPtr || !GH.windows().topWindow<GlobalLobbyLoginWindow>())
throw std::runtime_error("lobby connection finished without active login window!");
loginWindowPtr->onLoginSuccess();
}
void GlobalLobbyClient::receiveChatHistory(const JsonNode & json)
{
std::string channelType = json["channelType"].String();
std::string channelName = json["channelName"].String();
std::string channelKey = channelType + '_' + channelName;
// create empty entry, potentially replacing any pre-existing data
chatHistory[channelKey] = {};
auto lobbyWindowPtr = lobbyWindow.lock();
for(const auto & entry : json["messages"].Vector())
{
GlobalLobbyChannelMessage message;
message.accountID = entry["accountID"].String();
message.displayName = entry["displayName"].String();
message.messageText = entry["messageText"].String();
std::chrono::seconds ageSeconds (entry["ageSeconds"].Integer());
message.timeFormatted = TextOperations::getCurrentFormattedTimeLocal(-ageSeconds);
chatHistory[channelKey].push_back(message);
if(lobbyWindowPtr && lobbyWindowPtr->isChannelOpen(channelType, channelName))
lobbyWindowPtr->onGameChatMessage(message.displayName, message.messageText, message.timeFormatted, channelType, channelName);
}
if(lobbyWindowPtr && lobbyWindowPtr->isChannelOpen(channelType, channelName))
lobbyWindowPtr->refreshChatText();
}
void GlobalLobbyClient::receiveChatMessage(const JsonNode & json)
{
GlobalLobbyChannelMessage message;
message.accountID = json["accountID"].String();
message.displayName = json["displayName"].String();
message.messageText = json["messageText"].String();
message.timeFormatted = TextOperations::getCurrentFormattedTimeLocal();
std::string channelType = json["channelType"].String();
std::string channelName = json["channelName"].String();
std::string channelKey = channelType + '_' + channelName;
chatHistory[channelKey].push_back(message);
auto lobbyWindowPtr = lobbyWindow.lock();
if(lobbyWindowPtr)
{
lobbyWindowPtr->onGameChatMessage(message.displayName, message.messageText, message.timeFormatted, channelType, channelName);
lobbyWindowPtr->refreshChatText();
if(channelType == "player" || (lobbyWindowPtr->isChannelOpen(channelType, channelName) && lobbyWindowPtr->isActive()))
CCS->soundh->playSound(AudioPath::builtin("CHAT"));
}
}
void GlobalLobbyClient::receiveActiveAccounts(const JsonNode & json)
{
activeAccounts.clear();
for(const auto & jsonEntry : json["accounts"].Vector())
{
GlobalLobbyAccount account;
account.accountID = jsonEntry["accountID"].String();
account.displayName = jsonEntry["displayName"].String();
account.status = jsonEntry["status"].String();
activeAccounts.push_back(account);
}
auto lobbyWindowPtr = lobbyWindow.lock();
if(lobbyWindowPtr)
lobbyWindowPtr->onActiveAccounts(activeAccounts);
for (auto const & window : GH.windows().findWindows<GlobalLobbyObserver>())
window->onActiveAccounts(activeAccounts);
}
void GlobalLobbyClient::receiveActiveGameRooms(const JsonNode & json)
{
activeRooms.clear();
for(const auto & jsonEntry : json["gameRooms"].Vector())
{
GlobalLobbyRoom room;
room.gameRoomID = jsonEntry["gameRoomID"].String();
room.hostAccountID = jsonEntry["hostAccountID"].String();
room.hostAccountDisplayName = jsonEntry["hostAccountDisplayName"].String();
room.description = jsonEntry["description"].String();
room.statusID = jsonEntry["status"].String();
room.gameVersion = jsonEntry["version"].String();
room.modList = ModVerificationInfo::jsonDeserializeList(jsonEntry["mods"]);
std::chrono::seconds ageSeconds (jsonEntry["ageSeconds"].Integer());
room.startDateFormatted = TextOperations::getCurrentFormattedDateTimeLocal(-ageSeconds);
for(const auto & jsonParticipant : jsonEntry["participants"].Vector())
{
GlobalLobbyAccount account;
account.accountID = jsonParticipant["accountID"].String();
account.displayName = jsonParticipant["displayName"].String();
room.participants.push_back(account);
}
for(const auto & jsonParticipant : jsonEntry["invited"].Vector())
{
GlobalLobbyAccount account;
account.accountID = jsonParticipant["accountID"].String();
account.displayName = jsonParticipant["displayName"].String();
room.invited.push_back(account);
}
room.playerLimit = jsonEntry["playerLimit"].Integer();
activeRooms.push_back(room);
}
auto lobbyWindowPtr = lobbyWindow.lock();
if(lobbyWindowPtr)
lobbyWindowPtr->onActiveGameRooms(activeRooms);
for (auto const & window : GH.windows().findWindows<GlobalLobbyObserver>())
window->onActiveGameRooms(activeRooms);
}
void GlobalLobbyClient::receiveMatchesHistory(const JsonNode & json)
{
matchesHistory.clear();
for(const auto & jsonEntry : json["matchesHistory"].Vector())
{
GlobalLobbyRoom room;
room.gameRoomID = jsonEntry["gameRoomID"].String();
room.hostAccountID = jsonEntry["hostAccountID"].String();
room.hostAccountDisplayName = jsonEntry["hostAccountDisplayName"].String();
room.description = jsonEntry["description"].String();
room.statusID = jsonEntry["status"].String();
std::chrono::seconds ageSeconds (jsonEntry["ageSeconds"].Integer());
room.startDateFormatted = TextOperations::getCurrentFormattedDateTimeLocal(-ageSeconds);
for(const auto & jsonParticipant : jsonEntry["participants"].Vector())
{
GlobalLobbyAccount account;
account.accountID = jsonParticipant["accountID"].String();
account.displayName = jsonParticipant["displayName"].String();
room.participants.push_back(account);
}
room.playerLimit = jsonEntry["playerLimit"].Integer();
matchesHistory.push_back(room);
}
auto lobbyWindowPtr = lobbyWindow.lock();
if(lobbyWindowPtr)
lobbyWindowPtr->onMatchesHistory(matchesHistory);
}
void GlobalLobbyClient::receiveInviteReceived(const JsonNode & json)
{
auto lobbyWindowPtr = lobbyWindow.lock();
std::string gameRoomID = json["gameRoomID"].String();
std::string accountID = json["accountID"].String();
activeInvites.insert(gameRoomID);
if(lobbyWindowPtr)
{
std::string message = MetaString::createFromTextID("vcmi.lobby.invite.notification").toString();
std::string time = TextOperations::getCurrentFormattedTimeLocal();
lobbyWindowPtr->onGameChatMessage("System", message, time, "player", accountID);
lobbyWindowPtr->onInviteReceived(gameRoomID);
lobbyWindowPtr->refreshChatText();
}
CCS->soundh->playSound(AudioPath::builtin("CHAT"));
}
void GlobalLobbyClient::receiveJoinRoomSuccess(const JsonNode & json)
{
if (json["proxyMode"].Bool())
{
CSH->resetStateForLobby(EStartMode::NEW_GAME, ESelectionScreen::newGame, EServerMode::LOBBY_GUEST, { CSH->getGlobalLobby().getAccountDisplayName() });
CSH->loadMode = ELoadMode::MULTI;
std::string hostname = getServerHost();
uint16_t port = getServerPort();
CSH->connectToServer(hostname, port);
}
// NOTE: must be set after CSH->resetStateForLobby call
currentGameRoomUUID = json["gameRoomID"].String();
}
void GlobalLobbyClient::onConnectionEstablished(const std::shared_ptr<INetworkConnection> & connection)
{
boost::mutex::scoped_lock interfaceLock(GH.interfaceMutex);
networkConnection = connection;
auto loginWindowPtr = loginWindow.lock();
if(!loginWindowPtr || !GH.windows().topWindow<GlobalLobbyLoginWindow>())
throw std::runtime_error("lobby connection established without active login window!");
loginWindowPtr->onConnectionSuccess();
}
void GlobalLobbyClient::sendClientRegister(const std::string & accountName)
{
JsonNode toSend;
toSend["type"].String() = "clientRegister";
toSend["displayName"].String() = accountName;
toSend["language"].String() = CGI->generaltexth->getPreferredLanguage();
toSend["version"].String() = VCMI_VERSION_STRING;
sendMessage(toSend);
}
void GlobalLobbyClient::sendClientLogin()
{
JsonNode toSend;
toSend["type"].String() = "clientLogin";
toSend["accountID"].String() = getAccountID();
toSend["accountCookie"].String() = getAccountCookie();
toSend["language"].String() = CGI->generaltexth->getPreferredLanguage();
toSend["version"].String() = VCMI_VERSION_STRING;
for (const auto & language : activeChannels)
toSend["languageRooms"].Vector().push_back(JsonNode(language));
sendMessage(toSend);
}
void GlobalLobbyClient::onConnectionFailed(const std::string & errorMessage)
{
boost::mutex::scoped_lock interfaceLock(GH.interfaceMutex);
auto loginWindowPtr = loginWindow.lock();
if(!loginWindowPtr || !GH.windows().topWindow<GlobalLobbyLoginWindow>())
throw std::runtime_error("lobby connection failed without active login window!");
logGlobal->warn("Connection to game lobby failed! Reason: %s", errorMessage);
loginWindowPtr->onConnectionFailed(errorMessage);
}
void GlobalLobbyClient::onDisconnected(const std::shared_ptr<INetworkConnection> & connection, const std::string & errorMessage)
{
boost::mutex::scoped_lock interfaceLock(GH.interfaceMutex);
assert(connection == networkConnection);
networkConnection.reset();
accountLoggedIn = false;
while (!GH.windows().findWindows<GlobalLobbyWindow>().empty())
{
// if global lobby is open, pop all dialogs on top of it as well as lobby itself
GH.windows().popWindows(1);
}
CInfoWindow::showInfoDialog("Connection to game lobby was lost!", {});
}
void GlobalLobbyClient::sendMessage(const JsonNode & data)
{
assert(JsonUtils::validate(data, "vcmi:lobbyProtocol/" + data["type"].String(), data["type"].String() + " pack"));
networkConnection->sendPacket(data.toBytes());
}
void GlobalLobbyClient::sendOpenRoom(const std::string & mode, int playerLimit)
{
JsonNode toSend;
toSend["type"].String() = "activateGameRoom";
toSend["hostAccountID"].String() = getAccountID();
toSend["roomType"].String() = mode;
toSend["playerLimit"].Integer() = playerLimit;
sendMessage(toSend);
}
void GlobalLobbyClient::connect()
{
std::string hostname = getServerHost();
uint16_t port = getServerPort();
CSH->getNetworkHandler().connectToRemote(*this, hostname, port);
}
bool GlobalLobbyClient::isLoggedIn() const
{
return networkConnection != nullptr && accountLoggedIn;
}
bool GlobalLobbyClient::isConnected() const
{
return networkConnection != nullptr;
}
std::shared_ptr<GlobalLobbyLoginWindow> GlobalLobbyClient::createLoginWindow()
{
auto loginWindowPtr = loginWindow.lock();
if(loginWindowPtr)
return loginWindowPtr;
auto loginWindowNew = std::make_shared<GlobalLobbyLoginWindow>();
loginWindow = loginWindowNew;
return loginWindowNew;
}
std::shared_ptr<GlobalLobbyWindow> GlobalLobbyClient::createLobbyWindow()
{
auto lobbyWindowPtr = lobbyWindow.lock();
if(lobbyWindowPtr)
return lobbyWindowPtr;
lobbyWindowPtr = std::make_shared<GlobalLobbyWindow>();
lobbyWindow = lobbyWindowPtr;
lobbyWindowLock = lobbyWindowPtr;
return lobbyWindowPtr;
}
const std::vector<GlobalLobbyAccount> & GlobalLobbyClient::getActiveAccounts() const
{
return activeAccounts;
}
const std::vector<GlobalLobbyRoom> & GlobalLobbyClient::getActiveRooms() const
{
return activeRooms;
}
const std::vector<std::string> & GlobalLobbyClient::getActiveChannels() const
{
return activeChannels;
}
const std::vector<GlobalLobbyRoom> & GlobalLobbyClient::getMatchesHistory() const
{
return matchesHistory;
}
const GlobalLobbyRoom & GlobalLobbyClient::getActiveRoomByName(const std::string & roomUUID) const
{
for (auto const & room : activeRooms)
{
if (room.gameRoomID == roomUUID)
return room;
}
throw std::out_of_range("Failed to find room with UUID of " + roomUUID);
}
const std::vector<GlobalLobbyChannelMessage> & GlobalLobbyClient::getChannelHistory(const std::string & channelType, const std::string & channelName) const
{
static const std::vector<GlobalLobbyChannelMessage> emptyVector;
std::string keyToTest = channelType + '_' + channelName;
if (chatHistory.count(keyToTest) == 0)
{
if (channelType != "global")
{
JsonNode toSend;
toSend["type"].String() = "requestChatHistory";
toSend["channelType"].String() = channelType;
toSend["channelName"].String() = channelName;
CSH->getGlobalLobby().sendMessage(toSend);
}
return emptyVector;
}
else
return chatHistory.at(keyToTest);
}
void GlobalLobbyClient::activateInterface()
{
if (GH.windows().topWindow<GlobalLobbyWindow>() != nullptr)
{
GH.windows().popWindows(1);
return;
}
if (!GH.windows().findWindows<GlobalLobbyWindow>().empty())
return;
if (!GH.windows().findWindows<GlobalLobbyLoginWindow>().empty())
return;
if (isLoggedIn())
GH.windows().pushWindow(createLobbyWindow());
else
GH.windows().pushWindow(createLoginWindow());
GH.windows().topWindow<CIntObject>()->center();
}
void GlobalLobbyClient::activateRoomInviteInterface()
{
GH.windows().createAndPushWindow<GlobalLobbyInviteWindow>();
}
void GlobalLobbyClient::setAccountID(const std::string & accountID)
{
Settings configID = persistentStorage.write["lobby"][getServerHost()]["accountID"];
configID->String() = accountID;
}
void GlobalLobbyClient::setAccountCookie(const std::string & accountCookie)
{
Settings configCookie = persistentStorage.write["lobby"][getServerHost()]["accountCookie"];
configCookie->String() = accountCookie;
}
void GlobalLobbyClient::setAccountDisplayName(const std::string & accountDisplayName)
{
Settings configName = persistentStorage.write["lobby"][getServerHost()]["displayName"];
configName->String() = accountDisplayName;
}
const std::string & GlobalLobbyClient::getAccountID() const
{
return persistentStorage["lobby"][getServerHost()]["accountID"].String();
}
const std::string & GlobalLobbyClient::getAccountCookie() const
{
return persistentStorage["lobby"][getServerHost()]["accountCookie"].String();
}
const std::string & GlobalLobbyClient::getAccountDisplayName() const
{
return persistentStorage["lobby"][getServerHost()]["displayName"].String();
}
const std::string & GlobalLobbyClient::getServerHost() const
{
return settings["lobby"]["hostname"].String();
}
uint16_t GlobalLobbyClient::getServerPort() const
{
return settings["lobby"]["port"].Integer();
}
void GlobalLobbyClient::sendProxyConnectionLogin(const NetworkConnectionPtr & netConnection)
{
JsonNode toSend;
toSend["type"].String() = "clientProxyLogin";
toSend["accountID"].String() = getAccountID();
toSend["accountCookie"].String() = getAccountCookie();
toSend["gameRoomID"].String() = currentGameRoomUUID;
assert(JsonUtils::validate(toSend, "vcmi:lobbyProtocol/" + toSend["type"].String(), toSend["type"].String() + " pack"));
netConnection->sendPacket(toSend.toBytes());
}
void GlobalLobbyClient::resetMatchState()
{
currentGameRoomUUID.clear();
}
const std::string & GlobalLobbyClient::getCurrentGameRoomID() const
{
return currentGameRoomUUID;
}
void GlobalLobbyClient::sendMatchChatMessage(const std::string & messageText)
{
if (!isLoggedIn())
return; // we are not playing with lobby
if (currentGameRoomUUID.empty())
return; // we are not playing through lobby
JsonNode toSend;
toSend["type"].String() = "sendChatMessage";
toSend["channelType"].String() = "match";
toSend["channelName"].String() = currentGameRoomUUID;
toSend["messageText"].String() = messageText;
assert(TextOperations::isValidUnicodeString(messageText));
CSH->getGlobalLobby().sendMessage(toSend);
}
bool GlobalLobbyClient::isInvitedToRoom(const std::string & gameRoomID)
{
if (activeInvites.count(gameRoomID) > 0)
return true;
const auto & gameRoom = CSH->getGlobalLobby().getActiveRoomByName(gameRoomID);
for (auto const & invited : gameRoom.invited)
{
if (invited.accountID == getAccountID())
return true;
}
return false;
}
|