summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-23 17:25:24 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-23 17:25:24 +0300
commit16faca9102b7f6771fb0745d5b4bc694f966fca4 (patch)
treea6a1142744e9f9341a5356aa4476f0b418ec0c6c
parent5d8efa68f4e913ec2b25f41d4607d582efaa2ac5 (diff)
downloadmanaplus-16faca9102b7f6771fb0745d5b4bc694f966fca4.tar.gz
manaplus-16faca9102b7f6771fb0745d5b4bc694f966fca4.tar.bz2
manaplus-16faca9102b7f6771fb0745d5b4bc694f966fca4.tar.xz
manaplus-16faca9102b7f6771fb0745d5b4bc694f966fca4.zip
Into chat commands handlers send also event flags mask.
-rw-r--r--src/commandhandler.cpp2
-rw-r--r--src/events/inputevent.h6
-rw-r--r--src/input/inputmanager.cpp2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index daf65b6a8..b4537e431 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -113,7 +113,7 @@ void CommandHandler::callFunc(const CommandInfo &info,
const ActionFuncPtr func = info.func;
if (func)
{
- InputEvent evt(args, tab);
+ InputEvent evt(args, tab, 0);
func(evt);
}
else
diff --git a/src/events/inputevent.h b/src/events/inputevent.h
index 1d750c86a..53f629a1d 100644
--- a/src/events/inputevent.h
+++ b/src/events/inputevent.h
@@ -51,11 +51,13 @@ struct InputEvent final
mask(mask0)
{ }
- InputEvent(const std::string &args0, ChatTab *const tab0) :
+ InputEvent(const std::string &args0,
+ ChatTab *const tab0,
+ const int mask0) :
args(args0),
tab(tab0),
action(-1),
- mask(0)
+ mask(mask0)
{ }
const std::string args;
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index a74cea9e6..140600a0a 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -739,7 +739,7 @@ bool InputManager::executeChatCommand(const std::string &cmd,
ActionFuncPtr func = *(inputActionData[(*it).second].action);
if (func)
{
- InputEvent evt(args, tab);
+ InputEvent evt(args, tab, mMask);
func(evt);
return true;
}