Preparing the server management irc bot for further tasks.
This commit is contained in:
+5
-21
@@ -22,7 +22,7 @@
|
||||
#define _SERVERMANAGER_H_
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <third_party/boost/timers.hpp>
|
||||
#include <net/serverircbot.h>
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
#include <gui/guiinterface.h>
|
||||
|
||||
class ServerLobbyThread;
|
||||
class IrcThread;
|
||||
class ServerAcceptHelper;
|
||||
class SenderThread;
|
||||
class ConfigFile;
|
||||
class AvatarManager;
|
||||
class IrcThread;
|
||||
|
||||
class ServerManager : public IrcCallback
|
||||
class ServerManager
|
||||
{
|
||||
public:
|
||||
ServerManager(GuiInterface &gui, ConfigFile *config, AvatarManager &avatarManager);
|
||||
@@ -55,20 +55,7 @@ public:
|
||||
bool JoinAll(bool wait);
|
||||
|
||||
GuiInterface &GetGui();
|
||||
|
||||
virtual void SignalIrcConnect(const std::string &server);
|
||||
virtual void SignalIrcSelfJoined(const std::string &nickName, const std::string &channel);
|
||||
virtual void SignalIrcPlayerJoined(const std::string & /*nickName*/) {}
|
||||
virtual void SignalIrcPlayerChanged(const std::string & /*oldNick*/, const std::string & /*newNick*/) {}
|
||||
virtual void SignalIrcPlayerKicked(const std::string & /*nickName*/, const std::string & /*byWhom*/, const std::string & /*reason*/) {}
|
||||
virtual void SignalIrcPlayerLeft(const std::string & /*nickName*/) {}
|
||||
virtual void SignalIrcChatMsg(const std::string &nickName, const std::string &msg);
|
||||
virtual void SignalIrcError(int errorCode);
|
||||
virtual void SignalIrcServerError(int errorCode);
|
||||
virtual void SignalLobbyPlayerJoined(unsigned, const std::string & /*nickName*/) {}
|
||||
virtual void SignalLobbyPlayerKicked(const std::string & /*nickName*/, const std::string & /*byWhom*/, const std::string & /*reason*/) {}
|
||||
virtual void SignalLobbyPlayerLeft(unsigned) {}
|
||||
|
||||
ServerIrcBot &GetIrcBot();
|
||||
|
||||
protected:
|
||||
typedef std::list<boost::shared_ptr<ServerAcceptHelper> > AcceptHelperList;
|
||||
@@ -80,12 +67,9 @@ private:
|
||||
ConfigFile *m_playerConfig;
|
||||
AvatarManager &m_avatarManager;
|
||||
|
||||
std::string m_ircNick;
|
||||
|
||||
boost::shared_ptr<boost::asio::io_service> m_ioService;
|
||||
boost::shared_ptr<ServerLobbyThread> m_lobbyThread;
|
||||
boost::shared_ptr<IrcThread> m_ircThread;
|
||||
boost::timers::portable::microsec_timer m_ircRestartTimer;
|
||||
boost::shared_ptr<ServerIrcBot> m_ircBot;
|
||||
AcceptHelperList m_acceptHelperPool;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user