From 0a068a5f08b1805d5b385b8f81aaf3c7199bff06 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 18 Jun 2012 21:20:41 +0300 Subject: Add chat command /error for crash client. Some times this need for debuging. --- src/commandhandler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/commandhandler.cpp') 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); -- cgit v1.2.3-60-g2f50