summaryrefslogtreecommitdiff
path: root/src/commandhandler.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-18 19:42:42 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-18 19:43:41 +0300
commit00c7073096a7bf40cee7595d0d419b9feff1c120 (patch)
tree307e3c76b2eb7b828478a8cd8f323158d26ca766 /src/commandhandler.h
parent25a143ac11baebc9ecaf5c2c05d4808f20d54e3c (diff)
downloadmanaverse-00c7073096a7bf40cee7595d0d419b9feff1c120.tar.gz
manaverse-00c7073096a7bf40cee7595d0d419b9feff1c120.tar.bz2
manaverse-00c7073096a7bf40cee7595d0d419b9feff1c120.tar.xz
manaverse-00c7073096a7bf40cee7595d0d419b9feff1c120.zip
Add ability to call input action from commands.
add new commands: /drop - drop from first slot. /dropn - drop fro any slots. /movetotarget - move to target position. /movetohome - move to home position. /sethome - set home position.
Diffstat (limited to 'src/commandhandler.h')
-rw-r--r--src/commandhandler.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/commandhandler.h b/src/commandhandler.h
index 2bcd9e596..a655d8d32 100644
--- a/src/commandhandler.h
+++ b/src/commandhandler.h
@@ -33,7 +33,7 @@ class ChatTab;
extern ChatTab *localChatTab;
-typedef std::map<std::string, CommandFuncPtr> CommandsMap;
+typedef std::map<std::string, const CommandInfo*> CommandsMap;
typedef CommandsMap::const_iterator CommandsMapIter;
/**
@@ -89,6 +89,12 @@ class CommandHandler final
friend class ChatTab;
friend class WhisperTab;
CommandsMap mCommands;
+
+ private:
+ void callFunc(const CommandInfo &info,
+ const std::string &args,
+ ChatTab *const tab);
+
};
extern CommandHandler *commandHandler;