diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-21 15:24:49 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-03-21 15:24:49 +0000 |
commit | 4a20e71c66c0b7bbdd73ab26b3ca8c0d7f4c8b64 (patch) | |
tree | 67fc6704e4735cbc6f21d368dba349e9aed768eb /src/messagehandler.cpp | |
parent | 28f6096586bf4e3465140f48f1eae54f11fef88d (diff) | |
download | manaserv-4a20e71c66c0b7bbdd73ab26b3ca8c0d7f4c8b64.tar.gz manaserv-4a20e71c66c0b7bbdd73ab26b3ca8c0d7f4c8b64.tar.bz2 manaserv-4a20e71c66c0b7bbdd73ab26b3ca8c0d7f4c8b64.tar.xz manaserv-4a20e71c66c0b7bbdd73ab26b3ca8c0d7f4c8b64.zip |
More complete implementation of startListen and stopListen, told CVS to ignore
some files and compile fixes (it actually compiles now, just don't expect it to
do anything useful)
Diffstat (limited to 'src/messagehandler.cpp')
-rw-r--r-- | src/messagehandler.cpp | 45 |
1 files changed, 16 insertions, 29 deletions
diff --git a/src/messagehandler.cpp b/src/messagehandler.cpp index cc79d45e..52187076 100644 --- a/src/messagehandler.cpp +++ b/src/messagehandler.cpp @@ -24,45 +24,31 @@ #include "messagehandler.h" #include "debug.h" -/* recieveMessage - * This function recieves a message, then sends it to the appropriate handler - * sub-routine for processing. - * Preconditions: valid parameters, queue initialized, etc. - * Postconditions: message successfully processed. - */ -void MessageHandler::receiveMessage(NetComputer *computer, MessageIn &message) +/* +void AccountHandler::receiveMessage(NetComputer *computer, MessageIn &message) { int result = 0; // determine message type - /* switch(message.type) - * { - * case: TYPE_LOGIN - * result = loginMessage(computer, message); - * break; - * } - */ - - debugCatch(result); -} + switch(message.type) + { + case TYPE_LOGIN: + result = loginMessage(computer, message); + break; + } + debugCatch(result); +} +*/ -/* loginMessage - * Accepts a login message and interprets it, assigning the proper login - * Preconditions: The requested handle is not logged in already. - * The requested handle exists. - * The requested handle is not banned or restricted. - * The character profile is valid - * Postconditions: the player recieves access through a character in the world. - * Return Value: SUCCESS if the player was successfully assigned the requested char - * ERROR on early termination of the routine. - */ int MessageHandler::loginMessage(NetComputer *computer, MessageIn &message) { // Get the handle (account) the player is requesting // RETURN TMW_ACCOUNTERROR_NOEXIST if: requested does not handle exist - // RETURN TMW_ACCOUNTERROR_BANNED if: the handle status is HANDLE_STATUS_BANNED - // RETURN TMW_ACCOUNTERROR_ALREADYASSIGNED if: the handle is already assigned + // RETURN TMW_ACCOUNTERROR_BANNED if: the handle status is + // HANDLE_STATUS_BANNED + // RETURN TMW_ACCOUNTERROR_ALREADYASSIGNED if: the handle is already + // assigned // Get the character within that handle that the player is requesting // RETURN TMW_ACCOUNTERROR_CHARNOTFOUND if: character not found @@ -71,4 +57,5 @@ int MessageHandler::loginMessage(NetComputer *computer, MessageIn &message) // RETURN TMW_ACCOUNTERROR_ASSIGNFAILED if: assignment not successful // return TMW_SUCCESS -- successful exit + return TMW_SUCCESS; } |