diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-25 21:20:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-25 21:20:32 +0300 |
commit | 11bab6c211e60bfa7e50cf3de10429c1feaf9547 (patch) | |
tree | 932054e8ddf6699c333a254ddb82857fd10af0f8 /src/actions | |
parent | 68291eca8eecf85a0b928ede37cd62d42e910d90 (diff) | |
download | manaverse-11bab6c211e60bfa7e50cf3de10429c1feaf9547.tar.gz manaverse-11bab6c211e60bfa7e50cf3de10429c1feaf9547.tar.bz2 manaverse-11bab6c211e60bfa7e50cf3de10429c1feaf9547.tar.xz manaverse-11bab6c211e60bfa7e50cf3de10429c1feaf9547.zip |
Add chat command for copy text to clipboard.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/commands.cpp | 10 | ||||
-rw-r--r-- | src/actions/commands.h | 1 |
2 files changed, 11 insertions, 0 deletions
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) diff --git a/src/actions/commands.h b/src/actions/commands.h index 0b6f0cf30..c323bd84a 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -96,6 +96,7 @@ namespace Actions decHandler(skill); decHandler(craft); decHandler(npcClipboard); + decHandler(clipboardCopy); decHandler(addPickup); decHandler(removePickup); decHandler(ignorePickup); |