summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/input/inputmanager.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index 140600a0a..099e2b7fb 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -110,7 +110,12 @@ void InputManager::retrieve()
{
const std::string &cmd = inputActionData[i].chatCommand;
if (!cmd.empty())
- mChatMap[cmd] = i;
+ {
+ StringVect tokens;
+ splitToStringVector(tokens, cmd, '|');
+ FOR_EACH (StringVectCIter, it, tokens)
+ mChatMap[*it] = i;
+ }
#ifdef USE_SDL2
const std::string cf = std::string("sdl2")
+ inputActionData[i].configField;
@@ -856,10 +861,15 @@ void InputManager::addChatCommands(std::list<std::string> &arr)
std::string cmd = ad.chatCommand;
if (!cmd.empty())
{
- cmd = std::string("/").append(cmd);
- if (ad.useArgs)
- cmd.append(" ");
- arr.push_back(cmd);
+ StringVect tokens;
+ splitToStringVector(tokens, cmd, '|');
+ FOR_EACH (StringVectCIter, it, tokens)
+ {
+ cmd = std::string("/").append(*it);
+ if (ad.useArgs)
+ cmd.append(" ");
+ arr.push_back(cmd);
+ }
}
}
}