Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarClientCommandProcessor.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2025-05-10 10:52:34 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2025-05-10 10:52:34 +1000
commit9d30cbd22a3f78efb6984a347630d8d601002bc1 (patch)
tree060888673996fe54cb34578e24f888f211882b8a /source/frontend/StarClientCommandProcessor.cpp
parent93a8e3213287a1aab47a0a1e36925fc679f12f1d (diff)
make clipboard available when handling user-invoked chat commands
Diffstat (limited to 'source/frontend/StarClientCommandProcessor.cpp')
-rw-r--r--source/frontend/StarClientCommandProcessor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/frontend/StarClientCommandProcessor.cpp b/source/frontend/StarClientCommandProcessor.cpp
index ec8d743..d0afb0c 100644
--- a/source/frontend/StarClientCommandProcessor.cpp
+++ b/source/frontend/StarClientCommandProcessor.cpp
@@ -11,6 +11,7 @@
#include "StarQuestInterface.hpp"
#include "StarStatistics.hpp"
#include "StarInterfaceLuaBindings.hpp"
+#include "StarInput.hpp"
namespace Star {
@@ -74,7 +75,10 @@ String ClientCommandProcessor::previewQuestPane(StringList const& arguments, fun
return "No such quest";
}
-StringList ClientCommandProcessor::handleCommand(String const& commandLine) {
+StringList ClientCommandProcessor::handleCommand(String const& commandLine, bool userInput) {
+ Maybe<Input::ClipboardUnlock> unlock;
+ if (userInput) // allow clipboard usage during this code
+ unlock = Input::singleton().unlockClipboard();
try {
if (!commandLine.beginsWith("/"))
throw StarException("ClientCommandProcessor expected command, does not start with '/'");