summaryrefslogtreecommitdiff
path: root/src/commands.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-22 12:34:24 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-22 12:34:24 +0300
commit3472c0b5ef25dd9c9547a05a517366e46e6d9f78 (patch)
treee0abd956cafabf118a88b2bf06831dd3b64dbc1e /src/commands.h
parentaa85f15df21e65b42c62bcad25a331b944bf270f (diff)
downloadManaVerse-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.tar.gz
ManaVerse-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.tar.bz2
ManaVerse-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.tar.xz
ManaVerse-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.zip
Use same function prototypes for action and command handlers.
Diffstat (limited to 'src/commands.h')
-rw-r--r--src/commands.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/commands.h b/src/commands.h
index 8e8e58f5d..41eba435c 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -23,6 +23,8 @@
#ifndef COMMANDS_H
#define COMMANDS_H
+#include "actions/actionfuncptr.h"
+
#include "input/inputaction.h"
#include <string>
@@ -37,14 +39,12 @@ extern ChatTab *localChatTab;
#define BOOLEAN_OPTIONS _("Options to /%s are \"yes\", \"no\", \"true\", "\
"\"false\", \"1\", \"0\".")
-#define decHandler(name) void name(const std::string &args, ChatTab *const tab)
-
-typedef void (*CommandFuncPtr) (const std::string &args, ChatTab *const tab);
+#define decHandler(name) bool name(InputEvent &event)
struct CommandInfo final
{
const char *name;
- CommandFuncPtr func;
+ ActionFuncPtr func;
int actionId;
bool useArgs;
};