summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-22 12:29:25 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-22 12:29:25 +0300
commit7550d326fd1d1811eb3dcbf33a41ec57e109ddae (patch)
tree44b986fe77a4bcdf1aae4379321fee6bac3c06eb /src
parent61653ea26a02841754baf97a1124aeea2b21e101 (diff)
downloadmanaverse-7550d326fd1d1811eb3dcbf33a41ec57e109ddae.tar.gz
manaverse-7550d326fd1d1811eb3dcbf33a41ec57e109ddae.tar.bz2
manaverse-7550d326fd1d1811eb3dcbf33a41ec57e109ddae.tar.xz
manaverse-7550d326fd1d1811eb3dcbf33a41ec57e109ddae.zip
add dumpmods chat command for show enabled mods.
Diffstat (limited to 'src')
-rw-r--r--src/commands.cpp6
-rw-r--r--src/commands.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 07e0414d5..72fedeff1 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -1311,6 +1311,12 @@ impHandler0(testsdlfont)
#endif
}
+impHandler2(dumpMods)
+{
+ std::string str = "enabled mods: " + serverConfig.getValue("mods", "");
+ outStringNormal(tab, str, str);
+}
+
#ifdef USE_OPENGL
impHandler2(dumpGL)
{
diff --git a/src/commands.h b/src/commands.h
index a31dfe292..37e4b8215 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -116,6 +116,7 @@ namespace Commands
decHandler(dumpTests);
decHandler(dumpOGL);
decHandler(dumpGL);
+ decHandler(dumpMods);
decHandler(cacheInfo);
decHandler(execute);
decHandler(testsdlfont);
@@ -205,6 +206,7 @@ enum
COMMAND_DUMPT,
COMMAND_DUMPOGL,
COMMAND_DUMPGL,
+ COMMAND_DUMPMODS,
COMMAND_URL,
COMMAND_OPEN,
COMMAND_EXECUTE,
@@ -301,6 +303,7 @@ static const CommandInfo commands[] =
{"dumpt", &Commands::dumpTests, -1, false},
{"dumpogl", &Commands::dumpOGL, -1, false},
{"dumpgl", &Commands::dumpGL, -1, false},
+ {"dumpmods", &Commands::dumpMods, -1, false},
{"url", &Commands::url, -1, true},
{"open", &Commands::open, -1, true},
{"execute", &Commands::execute, -1, true},