diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-05 21:50:02 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-05 21:50:02 -0600 |
commit | bcc4695387d21f9629ab6f013aadbfe0d238aa6d (patch) | |
tree | 2e095ec94e99e788eb851a37cdf5eae68270424c /src/net/tmwserv/chathandler.cpp | |
parent | 9078373860729cdf80db8d09cbdee478dc54ec64 (diff) | |
download | mana-bcc4695387d21f9629ab6f013aadbfe0d238aa6d.tar.gz mana-bcc4695387d21f9629ab6f013aadbfe0d238aa6d.tar.bz2 mana-bcc4695387d21f9629ab6f013aadbfe0d238aa6d.tar.xz mana-bcc4695387d21f9629ab6f013aadbfe0d238aa6d.zip |
Implement TMWServ's Admin-, Chat-, and MapHandlers
Diffstat (limited to 'src/net/tmwserv/chathandler.cpp')
-rw-r--r-- | src/net/tmwserv/chathandler.cpp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/net/tmwserv/chathandler.cpp b/src/net/tmwserv/chathandler.cpp index 1c537e30..febffa12 100644 --- a/src/net/tmwserv/chathandler.cpp +++ b/src/net/tmwserv/chathandler.cpp @@ -23,6 +23,10 @@ #include "net/tmwserv/protocol.h" +#include "net/tmwserv/chatserver/chatserver.h" + +#include "net/tmwserv/gameserver/player.h" + #include "net/messagein.h" #include "being.h" @@ -42,6 +46,10 @@ extern Being *player_node; +Net::ChatHandler *chatHandler; + +namespace TmwServ { + ChatHandler::ChatHandler() { static const Uint16 _messages[] = { @@ -283,3 +291,59 @@ void ChatHandler::handleChannelEvent(MessageIn &msg) } } +void ChatHandler::talk(const std::string &text) +{ + Net::GameServer::Player::say(text); +} + +void ChatHandler::me(const std::string &text) +{ + // TODO +} + +void ChatHandler::privateMessage(const std::string &recipient, const std::string &text) +{ + Net::ChatServer::privMsg(recipient, text); +} + +void ChatHandler::channelList() +{ + Net::ChatServer::getChannelList(); +} + +void ChatHandler::enterChannel(const std::string &channel, const std::string &password) +{ + Net::ChatServer::enterChannel(channel, password); +} + +void ChatHandler::quitChannel(int channelId) +{ + Net::ChatServer::quitChannel(channelId); +} + +void ChatHandler::sendToChannel(int channelId, const std::string &text) +{ + Net::ChatServer::chat(channelId, text); +} + +void ChatHandler::userList(const std::string &channel) +{ + Net::ChatServer::getUserList(channel); +} + +void ChatHandler::setChannelTopic(int channelId, const std::string &text) +{ + Net::ChatServer::setChannelTopic(channelId, text); +} + +void ChatHandler::setUserMode(int channelId, const std::string &name, int mode) +{ + Net::ChatServer::setUserMode(channelId, name, mode); +} + +void ChatHandler::kickUser(int channelId, const std::string &name) +{ + Net::ChatServer::kickUser(channelId, name); +} + +} // namespace TmwServ |