aboutsummaryrefslogtreecommitdiff
path: root/src/commandHandler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/commandHandler.c')
-rw-r--r--src/commandHandler.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/commandHandler.c b/src/commandHandler.c
new file mode 100644
index 0000000..9d158f3
--- /dev/null
+++ b/src/commandHandler.c
@@ -0,0 +1,13 @@
+#include "commandHandler.h"
+
+struct CommandHandler handlers[MAX_HANDLERS];
+
+int handlerCount = 0;
+
+void registerHandler(char *name, F_EXECUTOR executor) {
+ struct CommandHandler newCH;
+ newCH.p_name = name;
+ newCH.p_executor = executor;
+
+ handlers[handlerCount++] = newCH;
+}