Added support for password protected irc channels. Added server IRC mode for admin use, to allow requesting statistics and kicking players.

This commit is contained in:
lotodore
2007-11-16 00:58:23 +00:00
parent 991c4367e2
commit cdd21250de
14 changed files with 277 additions and 50 deletions
+11 -1
View File
@@ -31,7 +31,8 @@
#include <list>
#include <core/boost/timers.hpp>
#define LOBBY_THREAD_TERMINATE_TIMEOUT 20000
#define LOBBY_THREAD_TERMINATE_TIMEOUT_MSEC 20000
#define ADMIN_IRC_TERMINATE_TIMEOUT_MSEC 2000
class SenderThread;
@@ -65,6 +66,8 @@ public:
void HandleGameRetrievePlayerInfo(SessionWrapper session, const NetPacketRetrievePlayerInfo &tmpPacket);
void HandleGameRetrieveAvatar(SessionWrapper session, const NetPacketRetrieveAvatar &tmpPacket);
bool KickPlayerByName(const std::string &playerName);
void AddComputerPlayer(boost::shared_ptr<PlayerData> player);
void RemoveComputerPlayer(boost::shared_ptr<PlayerData> player);
@@ -76,6 +79,8 @@ public:
AvatarManager &GetAvatarManager();
ServerStats GetStats() const;
protected:
typedef std::deque<boost::shared_ptr<ConnectData> > ConnectQueue;
@@ -105,10 +110,12 @@ protected:
void NewSessionLoop();
void CloseSessionLoop();
void RemoveGameLoop();
void KickPlayerLoop();
void CleanupAvatarCache();
void InternalAddGame(boost::shared_ptr<ServerGameThread> game);
void InternalRemoveGame(boost::shared_ptr<ServerGameThread> game);
void InternalKickPlayer(unsigned playerId);
void TerminateGames();
@@ -160,6 +167,9 @@ private:
RemoveGameList m_removeGameList;
mutable boost::mutex m_removeGameListMutex;
PlayerIdList m_kickPlayerList;
mutable boost::mutex m_kickPlayerListMutex;
PlayerDataMap m_computerPlayers;
mutable boost::mutex m_computerPlayersMutex;