summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-04 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-04 22:01:44 +0300
commitcbd616c89bd2650c931dc52a22b2309310efa196 (patch)
treee8b446b06945bf97212444b67744eabe65f31294
parent22bf37caec833bf38387a3a9f2d42bf3ea9bb3f4 (diff)
downloadplus-cbd616c89bd2650c931dc52a22b2309310efa196.tar.gz
plus-cbd616c89bd2650c931dc52a22b2309310efa196.tar.bz2
plus-cbd616c89bd2650c931dc52a22b2309310efa196.tar.xz
plus-cbd616c89bd2650c931dc52a22b2309310efa196.zip
Add chat command /dumpt for dumping last testing values.
-rw-r--r--src/commandhandler.cpp9
-rw-r--r--src/commandhandler.h2
-rw-r--r--src/gui/chatwindow.cpp1
3 files changed, 12 insertions, 0 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index 04ef1b3f4..cd8169651 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -202,6 +202,8 @@ void CommandHandler::handleCommand(const std::string &command, ChatTab *tab)
handleServerUnIgnoreAll(args, tab);
else if (type == "dumpg")
handleDumpGraphics(args, tab);
+ else if (type == "dumpt")
+ handleDumpTests(args, tab);
else if (tab->handleCommand(type, args))
;
else if (type == "hack")
@@ -1125,6 +1127,13 @@ void CommandHandler::handleDumpGraphics(const std::string &args A_UNUSED,
outString(tab, str, str);
}
+void CommandHandler::handleDumpTests(const std::string &args A_UNUSED,
+ ChatTab *tab)
+{
+ std::string str = config.getStringValue("testInfo");
+ outString(tab, str, str);
+}
+
#ifdef DEBUG_DUMP_LEAKS
void showRes(std::string str, ResourceManager::Resources *res);
diff --git a/src/commandhandler.h b/src/commandhandler.h
index b97b191ff..af54278ac 100644
--- a/src/commandhandler.h
+++ b/src/commandhandler.h
@@ -299,6 +299,8 @@ class CommandHandler
void handleDumpGraphics(const std::string &args, ChatTab *tab);
+ void handleDumpTests(const std::string &args, ChatTab *tab);
+
void outString(ChatTab *tab, const std::string &str,
const std::string &def);
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 84d61cf65..4fd48b4c3 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -305,6 +305,7 @@ void ChatWindow::fillCommands()
mCommands.push_back("/serverignoreall");
mCommands.push_back("/serverunignoreall");
mCommands.push_back("/dumpg");
+ mCommands.push_back("/dumpt");
mCommands.push_back("/pseudoaway ");
mCommands.push_back("<PLAYER>");
mCommands.push_back("<MONSTER>");