From 3472c0b5ef25dd9c9547a05a517366e46e6d9f78 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 22 Aug 2014 12:34:24 +0300 Subject: Use same function prototypes for action and command handlers. --- src/commands.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/commands.h') 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 @@ -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; }; -- cgit v1.2.3-70-g09d2