diff options
Diffstat (limited to 'commandRouter.c')
| -rw-r--r-- | commandRouter.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/commandRouter.c b/commandRouter.c deleted file mode 100644 index 3d41ddd..0000000 --- a/commandRouter.c +++ /dev/null @@ -1,20 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <stdbool.h> -#include <strings.h> -#include "commandHandler.h" - -extern struct CommandHandler handlers[MAX_HANDLERS]; -extern int handlerCount; - -bool route(char *command) { - command = strtok(command, " "); - - for (int i = 0; i < handlerCount; i++) { - if (strcasecmp(handlers[i].p_name, command) == 0) { - handlers[i].p_executor(command); - return true; - } - } - return false; -} |
