more work on buddy&ignore

This commit is contained in:
Max-Wilhelm Bruker
2011-03-01 21:04:45 +01:00
parent 4149f78001
commit 0afdbc7222
9 changed files with 28 additions and 21 deletions

View File

@@ -179,6 +179,11 @@ ResponseCode Server_Game::checkJoin(ServerInfo_User *user, const QString &_passw
return RespWrongPassword;
if (!(user->getUserLevel() & ServerInfo_User::IsRegistered) && onlyRegistered)
return RespUserLevelTooLow;
if (onlyBuddies)
if (!static_cast<Server_Room *>(parent())->getServer()->getBuddyList(creatorInfo->getName()).contains(user->getName()))
return RespOnlyBuddies;
if (static_cast<Server_Room *>(parent())->getServer()->getIgnoreList(creatorInfo->getName()).contains(user->getName()))
return RespOnIgnoreList;
if (spectator) {
if (!spectatorsAllowed)
return RespSpectatorsNotAllowed;