diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-18 21:20:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-18 21:21:49 +0300 |
commit | 0a068a5f08b1805d5b385b8f81aaf3c7199bff06 (patch) | |
tree | 0d2b9fabc4a82d99e3fea00c9cc6911128c83eeb /src | |
parent | 0ae5f563f0a4b89054c960dbd51245f73d1cfaaa (diff) | |
download | mv-0a068a5f08b1805d5b385b8f81aaf3c7199bff06.tar.gz mv-0a068a5f08b1805d5b385b8f81aaf3c7199bff06.tar.bz2 mv-0a068a5f08b1805d5b385b8f81aaf3c7199bff06.tar.xz mv-0a068a5f08b1805d5b385b8f81aaf3c7199bff06.zip |
Add chat command /error for crash client.
Some times this need for debuging.
Diffstat (limited to 'src')
-rw-r--r-- | src/commandhandler.cpp | 9 | ||||
-rw-r--r-- | src/commandhandler.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 5d69b2de3..ee06fe776 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -207,6 +207,8 @@ void CommandHandler::handleCommand(const std::string &command, ChatTab *tab) handleServerUnIgnoreAll(args, tab); else if (type == "setdrop") handleSetDrop(args, tab); + else if (type == "error") + handleError(args, tab); else if (type == "dumpg") handleDumpGraphics(args, tab); else if (type == "dumpt") @@ -1202,6 +1204,13 @@ void CommandHandler::handleSetDrop(const std::string &args, player_node->setQuickDropCounter(atoi(args.c_str())); } +void CommandHandler::handleError(const std::string &args A_UNUSED, + ChatTab *tab A_UNUSED) +{ + int *ptr = nullptr; + logger->log("test %d", *ptr); +} + #ifdef DEBUG_DUMP_LEAKS void showRes(std::string str, ResourceManager::Resources *res); diff --git a/src/commandhandler.h b/src/commandhandler.h index a8f21ac7a..478211738 100644 --- a/src/commandhandler.h +++ b/src/commandhandler.h @@ -298,6 +298,8 @@ class CommandHandler void handleSetDrop(const std::string &args, ChatTab *tab); + void handleError(const std::string &args, ChatTab *tab); + void handleDump(const std::string &args, ChatTab *tab); void handleDumpGraphics(const std::string &args, ChatTab *tab); |