From 11bab6c211e60bfa7e50cf3de10429c1feaf9547 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 May 2017 21:20:32 +0300 Subject: Add chat command for copy text to clipboard. --- src/actions/commands.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/actions/commands.cpp') diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index ae50680fb..ebf4413e1 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -73,6 +73,7 @@ #include "utils/booleanoptions.h" #include "utils/chatutils.h" +#include "utils/copynpaste.h" #include "utils/gmfunctions.h" #include "utils/parameters.h" #include "utils/process.h" @@ -1197,6 +1198,15 @@ impHandler(npcClipboard) return false; } +impHandler(clipboardCopy) +{ + const std::string args = event.args; + if (args.empty()) + return false; + sendBuffer(args); + return true; +} + impHandler(addPickup) { if (actorManager) -- cgit v1.2.3-70-g09d2