summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-01 01:21:39 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-01 01:21:39 +0300
commit0f25d9c48f75b270da3ec7c86b21f17877513f21 (patch)
treed0e84d7aced4bbe5375a470a4b23136c9684e846 /src/actions/commands.cpp
parent368931eb3af8153f8bba5cae9ff89ad57bb4a1b7 (diff)
downloadmv-0f25d9c48f75b270da3ec7c86b21f17877513f21.tar.gz
mv-0f25d9c48f75b270da3ec7c86b21f17877513f21.tar.bz2
mv-0f25d9c48f75b270da3ec7c86b21f17877513f21.tar.xz
mv-0f25d9c48f75b270da3ec7c86b21f17877513f21.zip
Add chat command to show configuration variable in chat.
New chat command: /confget varname Alias: /getconf varname
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index e5ad161e3..d56995745 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -935,4 +935,16 @@ impHandler(serverConfSet)
return false;
}
+impHandler(confGet)
+{
+ const std::string args = event.args;
+ if (args.empty())
+ return false;
+
+ const std::string str = strprintf(_("Config value: %s"),
+ config.getStringValue(args).c_str());
+ outStringNormal(event.tab, str, str);
+ return true;
+}
+
} // namespace Actions