summaryrefslogtreecommitdiff
path: root/src/commandhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-18 21:20:41 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-18 21:21:49 +0300
commit0a068a5f08b1805d5b385b8f81aaf3c7199bff06 (patch)
tree0d2b9fabc4a82d99e3fea00c9cc6911128c83eeb /src/commandhandler.cpp
parent0ae5f563f0a4b89054c960dbd51245f73d1cfaaa (diff)
downloadmanaverse-0a068a5f08b1805d5b385b8f81aaf3c7199bff06.tar.gz
manaverse-0a068a5f08b1805d5b385b8f81aaf3c7199bff06.tar.bz2
manaverse-0a068a5f08b1805d5b385b8f81aaf3c7199bff06.tar.xz
manaverse-0a068a5f08b1805d5b385b8f81aaf3c7199bff06.zip
Add chat command /error for crash client.
Some times this need for debuging.
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r--src/commandhandler.cpp9
1 files changed, 9 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);