diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-02-27 16:39:17 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-02-27 16:39:17 +0000 |
commit | 7a6e4d3c87ca4d7cc851af47fd9ebb616168f4c9 (patch) | |
tree | a880298777fcbb47a897e45ce6344ddbdf61b210 /src/net/chatserver | |
parent | ec72908d291fff37486a70d1624cfcece23b9bf7 (diff) | |
download | mana-7a6e4d3c87ca4d7cc851af47fd9ebb616168f4c9.tar.gz mana-7a6e4d3c87ca4d7cc851af47fd9ebb616168f4c9.tar.bz2 mana-7a6e4d3c87ca4d7cc851af47fd9ebb616168f4c9.tar.xz mana-7a6e4d3c87ca4d7cc851af47fd9ebb616168f4c9.zip |
Implementation of chat channels by Trapdoor.
Diffstat (limited to 'src/net/chatserver')
-rw-r--r-- | src/net/chatserver/chatserver.cpp | 15 | ||||
-rw-r--r-- | src/net/chatserver/chatserver.h | 5 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/net/chatserver/chatserver.cpp b/src/net/chatserver/chatserver.cpp index 32979ea5..f24e4cd5 100644 --- a/src/net/chatserver/chatserver.cpp +++ b/src/net/chatserver/chatserver.cpp @@ -81,14 +81,14 @@ void Net::ChatServer::privMsg(const std::string &recipient, } void Net::ChatServer::registerChannel(const std::string &name, - const std::string &annoucement, const std::string &password, + const std::string &announcement, const std::string &password, char isPrivate) { MessageOut msg(PCMSG_REGISTER_CHANNEL); msg.writeByte(isPrivate); msg.writeString(name); - msg.writeString(annoucement); + msg.writeString(announcement); msg.writeString(password); connection->send(msg); @@ -103,11 +103,11 @@ void Net::ChatServer::unregisterChannel(short channel) connection->send(msg); } -void Net::ChatServer::enterChannel(short channel, const std::string &password) +void Net::ChatServer::enterChannel(const std::string &channel, const std::string &password) { MessageOut msg(PCMSG_ENTER_CHANNEL); - msg.writeShort(channel); + msg.writeString(channel); msg.writeString(password); connection->send(msg); @@ -121,3 +121,10 @@ void Net::ChatServer::quitChannel(short channel) connection->send(msg); } + +void Net::ChatServer::getChannelList() +{ + MessageOut msg(PCMSG_LIST_CHANNELS); + + connection->send(msg); +} diff --git a/src/net/chatserver/chatserver.h b/src/net/chatserver/chatserver.h index cf86baf3..c4e0003d 100644 --- a/src/net/chatserver/chatserver.h +++ b/src/net/chatserver/chatserver.h @@ -48,9 +48,12 @@ namespace Net void unregisterChannel(short channel); - void enterChannel(short channel, const std::string &password); + void enterChannel(const std::string &channel, const std::string &password); void quitChannel(short channel); + + void getChannelList(); + } } |