summaryrefslogtreecommitdiffstats
path: root/src/chat-server
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-24 17:20:36 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-24 17:20:36 +0200
commit610ececb74d5efb4ed4df54dbceaa54fcbcf99e5 (patch)
tree4cfa485ebd00103bcb7cd7c139435bc0c92088e4 /src/chat-server
parentaf12180611e2c0520ee4974d5246e474fd8e704e (diff)
downloadmanaserv-610ececb74d5efb4ed4df54dbceaa54fcbcf99e5.tar.gz
manaserv-610ececb74d5efb4ed4df54dbceaa54fcbcf99e5.tar.xz
manaserv-610ececb74d5efb4ed4df54dbceaa54fcbcf99e5.zip
Made it possible to specify the host to listen on
Needed when the server has multiple network interfaces and the one you want to use isn't the default one for localhost. The host to listen on can be set in config file with 'net_listenHost'.
Diffstat (limited to 'src/chat-server')
-rw-r--r--src/chat-server/chathandler.cpp4
-rw-r--r--src/chat-server/chathandler.hpp3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/chat-server/chathandler.cpp b/src/chat-server/chathandler.cpp
index 147107a..5013a07 100644
--- a/src/chat-server/chathandler.cpp
+++ b/src/chat-server/chathandler.cpp
@@ -55,10 +55,10 @@ ChatHandler::ChatHandler():
{
}
-bool ChatHandler::startListen(enet_uint16 port)
+bool ChatHandler::startListen(enet_uint16 port, const std::string &host)
{
LOG_INFO("Chat handler started:");
- return ConnectionHandler::startListen(port);
+ return ConnectionHandler::startListen(port, host);
}
void ChatHandler::deletePendingClient(ChatClient *c)
diff --git a/src/chat-server/chathandler.hpp b/src/chat-server/chathandler.hpp
index 1de44fc..e23a7eb 100644
--- a/src/chat-server/chathandler.hpp
+++ b/src/chat-server/chathandler.hpp
@@ -64,13 +64,12 @@ class ChatHandler : public ConnectionHandler
std::vector<PartyInvite> mPartyInvitedUsers;
public:
-
ChatHandler();
/**
* Start the handler.
*/
- bool startListen(enet_uint16 port);
+ bool startListen(enet_uint16 port, const std::string &host);
/**
* Tell a list of users about an event in a chatchannel.