summaryrefslogtreecommitdiffstats
path: root/src/game-server/gamehandler.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-10-31 12:45:17 +0000
committerDavid Athay <ko2fan@gmail.com>2008-10-31 12:45:17 +0000
commit3ec0d0f152be4381dc843bc1ca99f8731c8fb366 (patch)
tree46bba84f40fcffdbede12931bbc92da4f764b4ed /src/game-server/gamehandler.cpp
parent8ddad761280216252953bee9467e2787aaee484e (diff)
Changed command system to handle commands without template magic.
Diffstat (limited to 'src/game-server/gamehandler.cpp')
-rw-r--r--src/game-server/gamehandler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game-server/gamehandler.cpp b/src/game-server/gamehandler.cpp
index 907bee1..9fd93a4 100644
--- a/src/game-server/gamehandler.cpp
+++ b/src/game-server/gamehandler.cpp
@@ -28,6 +28,7 @@
#include "game-server/accountconnection.hpp"
#include "game-server/buysell.hpp"
+#include "game-server/commandhandler.hpp"
#include "game-server/inventory.hpp"
#include "game-server/item.hpp"
#include "game-server/itemmanager.hpp"
@@ -192,9 +193,9 @@ void GameHandler::processMessage(NetComputer *comp, MessageIn &message)
if (say[0] == '@')
{
- // Handle special command.
- extern void runCommand(Character *, std::string const &);
- runCommand(computer.character, say);
+ CommandHandler *commandHandler = new CommandHandler();
+ commandHandler->handleCommand(computer.character, say);
+ delete commandHandler;
break;
}
GameState::sayAround(computer.character, say);