summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 29e7e740c..29414b18d 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -409,4 +409,18 @@ impHandler(navigate)
return true;
}
+impHandler(imitation)
+{
+ if (!localPlayer)
+ return false;
+
+ if (!event.args.empty())
+ localPlayer->setImitate(event.args);
+ else if (event.tab && event.tab->getType() == ChatTabType::WHISPER)
+ localPlayer->setImitate(static_cast<WhisperTab*>(event.tab)->getNick());
+ else
+ localPlayer->setImitate("");
+ return true;
+}
+
} // namespace Actions