diff options
author | Roderic Morris <roderic@ccs.neu.edu> | 2008-07-07 16:59:55 +0000 |
---|---|---|
committer | Roderic Morris <roderic@ccs.neu.edu> | 2008-07-07 16:59:55 +0000 |
commit | e91747e5025d5e37b2b856e30d6fb5da6968364c (patch) | |
tree | f80189890a67d1dca30b82c3c774d185cc3572fa /src/net | |
parent | 9bf9b2c706290b61af0f66f11ff1b3cd37d72904 (diff) | |
download | mana-client-e91747e5025d5e37b2b856e30d6fb5da6968364c.tar.gz mana-client-e91747e5025d5e37b2b856e30d6fb5da6968364c.tar.bz2 mana-client-e91747e5025d5e37b2b856e30d6fb5da6968364c.tar.xz mana-client-e91747e5025d5e37b2b856e30d6fb5da6968364c.zip |
get rid of channel registering related code
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/chathandler.cpp | 34 | ||||
-rw-r--r-- | src/net/chathandler.h | 5 | ||||
-rw-r--r-- | src/net/chatserver/chatserver.cpp | 11 | ||||
-rw-r--r-- | src/net/chatserver/chatserver.h | 3 | ||||
-rw-r--r-- | src/net/protocol.h | 2 |
5 files changed, 0 insertions, 55 deletions
diff --git a/src/net/chathandler.cpp b/src/net/chathandler.cpp index ce4a91da..43ca5a71 100644 --- a/src/net/chathandler.cpp +++ b/src/net/chathandler.cpp @@ -47,7 +47,6 @@ ChatHandler::ChatHandler() { static const Uint16 _messages[] = { GPMSG_SAY, - CPMSG_REGISTER_CHANNEL_RESPONSE, CPMSG_ENTER_CHANNEL_RESPONSE, CPMSG_LIST_CHANNELS_RESPONSE, CPMSG_PUBMSG, @@ -69,10 +68,6 @@ void ChatHandler::handleMessage(MessageIn &msg) handleGameChatMessage(msg); break; - case CPMSG_REGISTER_CHANNEL_RESPONSE: - handleRegisterChannelResponse(msg); - break; - case CPMSG_ENTER_CHANNEL_RESPONSE: handleEnterChannelResponse(msg); break; @@ -131,35 +126,6 @@ void ChatHandler::handleGameChatMessage(MessageIn &msg) } } -void ChatHandler::handleRegisterChannelResponse(MessageIn &msg) -{ - char error = msg.readInt8(); - if(error == ERRMSG_OK) - { - short channelId = msg.readInt16(); - std::string channelName = msg.readString(); - std::string channelAnnouncement = msg.readString(); - chatWindow->chatLog("Registered Channel " + channelName); - channelManager->addChannel(new Channel(channelId, - channelName, - channelAnnouncement)); - chatWindow->createNewChannelTab(channelName); - chatWindow->chatLog("Topic: " + channelAnnouncement, BY_CHANNEL, channelName); - - } - else - { - if (error == ERRMSG_INVALID_ARGUMENT) - { - chatWindow->chatLog("Error registering channel - Invalid Channel Name given", BY_SERVER); - } - else - { - chatWindow->chatLog("Error registering channel", BY_SERVER); - } - } -} - void ChatHandler::handleEnterChannelResponse(MessageIn &msg) { if(msg.readInt8() == ERRMSG_OK) diff --git a/src/net/chathandler.h b/src/net/chathandler.h index 874998d9..7ca4d50d 100644 --- a/src/net/chathandler.h +++ b/src/net/chathandler.h @@ -43,11 +43,6 @@ class ChatHandler : public MessageHandler void handleGameChatMessage(MessageIn &msg); /** - * Handle channel registration responses. - */ - void handleRegisterChannelResponse(MessageIn &msg); - - /** * Handle channel entry responses. */ void handleEnterChannelResponse(MessageIn &msg); diff --git a/src/net/chatserver/chatserver.cpp b/src/net/chatserver/chatserver.cpp index c6df7c83..a2dbefbb 100644 --- a/src/net/chatserver/chatserver.cpp +++ b/src/net/chatserver/chatserver.cpp @@ -80,17 +80,6 @@ void Net::ChatServer::privMsg(const std::string &recipient, connection->send(msg); } -void Net::ChatServer::registerChannel(const std::string &name, - const std::string &topic, const std::string &password) -{ - MessageOut msg(PCMSG_REGISTER_CHANNEL); - msg.writeString(name); - msg.writeString(topic); - msg.writeString(password); - - connection->send(msg); -} - void Net::ChatServer::enterChannel(const std::string &channel, const std::string &password) { MessageOut msg(PCMSG_ENTER_CHANNEL); diff --git a/src/net/chatserver/chatserver.h b/src/net/chatserver/chatserver.h index dac19e88..56ad46ca 100644 --- a/src/net/chatserver/chatserver.h +++ b/src/net/chatserver/chatserver.h @@ -42,9 +42,6 @@ namespace Net void privMsg(const std::string &recipient, const std::string &text); - void registerChannel(const std::string &name, - const std::string &topic, const std::string &password); - void enterChannel(const std::string &channel, const std::string &password); void quitChannel(short channel); diff --git a/src/net/protocol.h b/src/net/protocol.h index 76a8ffab..89713591 100644 --- a/src/net/protocol.h +++ b/src/net/protocol.h @@ -163,8 +163,6 @@ enum { PCMSG_ANNOUNCE = 0x0411, // S text PCMSG_PRIVMSG = 0x0412, // S user, S text // -- Channeling - PCMSG_REGISTER_CHANNEL = 0x0420, // S name, S topic, S password - CPMSG_REGISTER_CHANNEL_RESPONSE = 0x0421, // B error, W id, S name, S topic CPMSG_CHANNEL_EVENT = 0x0430, // W channel, B event, S info PCMSG_ENTER_CHANNEL = 0x0440, // S channel, S password CPMSG_ENTER_CHANNEL_RESPONSE = 0x0441, // B error, W id, S name, S topic, S userlist |