From: <ma...@us...> - 2013-03-29 13:56:46
|
Revision: 8646 http://planeshift.svn.sourceforge.net/planeshift/?rev=8646&view=rev Author: magodra Date: 2013-03-29 13:56:37 +0000 (Fri, 29 Mar 2013) Log Message: ----------- - Fixed compiler warning due to missing virtual destructor. - Fixed a few code standard issues. Modified Paths: -------------- trunk/src/client/gui/pawsloginwindow.cpp trunk/src/server/adminmanager.cpp trunk/src/server/adminmanager.h trunk/src/server/authentserver.cpp trunk/src/server/clients.cpp Modified: trunk/src/client/gui/pawsloginwindow.cpp =================================================================== --- trunk/src/client/gui/pawsloginwindow.cpp 2013-03-28 14:51:18 UTC (rev 8645) +++ trunk/src/client/gui/pawsloginwindow.cpp 2013-03-29 13:56:37 UTC (rev 8646) @@ -290,35 +290,39 @@ } switch (servers[listBox->GetSelectedRowNum()]->GetStatus()) - { - case psServerPinger::INIT: - case psServerPinger::FAILED: - { - psSystemMessage error(0,MSG_ERROR,PawsManager::GetSingleton().Translate("The server isn't available!")); - error.FireEvent(); - return true; - } - case psServerPinger::FULL: - // GM's should be able to connect, even if server is full. - // So in this case the server have to decide if it accept the - // connection. - ConnectToServer(); - return true; - case psServerPinger::LOCKED: - { - psSystemMessage error(0,MSG_ERROR,PawsManager::GetSingleton().Translate("The server is locked!")); - error.FireEvent(); - return true; - } - case psServerPinger::WAIT: - { - psSystemMessage error(0,MSG_ERROR,PawsManager::GetSingleton().Translate("The server isn't ready!")); - error.FireEvent(); - return true; - } - case psServerPinger::READY: - ConnectToServer(); - return true; + { + case psServerPinger::INIT: + case psServerPinger::FAILED: + { + psSystemMessage error(0,MSG_ERROR,PawsManager::GetSingleton().Translate("The server isn't available!")); + error.FireEvent(); + return true; + } + case psServerPinger::FULL: + { + // GM's should be able to connect, even if server is full. + // So in this case the server have to decide if it accept the + // connection. + ConnectToServer(); + return true; + } + case psServerPinger::LOCKED: + { + psSystemMessage error(0,MSG_ERROR,PawsManager::GetSingleton().Translate("The server is locked!")); + error.FireEvent(); + return true; + } + case psServerPinger::WAIT: + { + psSystemMessage error(0,MSG_ERROR,PawsManager::GetSingleton().Translate("The server isn't ready!")); + error.FireEvent(); + return true; + } + case psServerPinger::READY: + { + ConnectToServer(); + return true; + } } return true; Modified: trunk/src/server/adminmanager.cpp =================================================================== --- trunk/src/server/adminmanager.cpp 2013-03-28 14:51:18 UTC (rev 8645) +++ trunk/src/server/adminmanager.cpp 2013-03-29 13:56:37 UTC (rev 8646) @@ -146,6 +146,11 @@ rewardType = prewardType; } +psRewardData::~psRewardData() +{ + +} + bool psRewardData::IsZero() { return true; Modified: trunk/src/server/adminmanager.h =================================================================== --- trunk/src/server/adminmanager.h 2013-03-28 14:51:18 UTC (rev 8645) +++ trunk/src/server/adminmanager.h 2013-03-29 13:56:37 UTC (rev 8646) @@ -102,6 +102,10 @@ */ psRewardData(Reward_Type prewardType); + /** Destructor. + */ + virtual ~psRewardData(); + /** @brief checks if the reward is zero * returns bool: true when reward is a zero gain, otherwise false */ Modified: trunk/src/server/authentserver.cpp =================================================================== --- trunk/src/server/authentserver.cpp 2013-03-28 14:51:18 UTC (rev 8645) +++ trunk/src/server/authentserver.cpp 2013-03-29 13:56:37 UTC (rev 8646) @@ -221,7 +221,6 @@ csTicks start = csGetTicks(); psAuthenticationMessage msg(me); // This cracks message into members. - if (!msg.valid) { Debug1(LOG_NET,me->clientnum,"Mangled psAuthenticationMessage received.\n"); @@ -513,10 +512,14 @@ } if (psserver->GetCacheManager()->GetCommandManager()->Validate(client->GetSecurityLevel(), "default advisor")) + { psserver->GetAdviceManager()->AddAdvisor(client); + } if (psserver->GetCacheManager()->GetCommandManager()->Validate(client->GetSecurityLevel(), "default buddylisthide")) + { client->SetBuddyListHide(true); + } psserver->GetWeatherManager()->SendClientGameTime(me->clientnum); Modified: trunk/src/server/clients.cpp =================================================================== --- trunk/src/server/clients.cpp 2013-03-28 14:51:18 UTC (rev 8645) +++ trunk/src/server/clients.cpp 2013-03-29 13:56:37 UTC (rev 8646) @@ -26,8 +26,6 @@ #include "util/log.h" #include "netmanager.h" -//static int compareClientsByName(Client * const &, Client * const &); - ClientConnectionSet::ClientConnectionSet():addrHash(307),hash(307) { } @@ -75,13 +73,6 @@ return client; } -/* -static int compareClientsByName(Client * const &a, Client * const &b) -{ - return strcmp(a->GetName(), b->GetName()); -} -*/ - void ClientConnectionSet::MarkDelete(Client *client) { CS::Threading::RecursiveMutexScopedLock lock (mutex); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |