summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-01 00:59:11 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-01 00:59:11 +0300
commiteb694307c2b73e64f208c0d37d4c79207018d07a (patch)
tree7c8e33af2710b21e57639bb3b3f166c360a0c05f /src/actions/commands.cpp
parent4eeaa9b0aba548f8f4bd66c6f414884b8462a636 (diff)
downloadManaVerse-eb694307c2b73e64f208c0d37d4c79207018d07a.tar.gz
ManaVerse-eb694307c2b73e64f208c0d37d4c79207018d07a.tar.bz2
ManaVerse-eb694307c2b73e64f208c0d37d4c79207018d07a.tar.xz
ManaVerse-eb694307c2b73e64f208c0d37d4c79207018d07a.zip
Add chat command to set config variables.
New chat command: /confset varname value Alias: /setconf varname value
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index c74c2397a..75d491f9e 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -909,4 +909,17 @@ impHandler0(leaveChatRoom)
#endif
}
+impHandler(confSet)
+{
+ std::string name;
+ std::string val;
+
+ if (parse2Str(event.args, name, val))
+ {
+ config.setValue(name, val);
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions