diff --git a/include/commands.h b/include/commands.h index f43dbe3..ca67531 100644 --- a/include/commands.h +++ b/include/commands.h @@ -258,7 +258,7 @@ extern void ame (char *, char *, char *, char *); extern void unload_dll (char *, char *, char *, char *); #endif -IrcCommand *BX_find_command (const char *, int *); +const IrcCommand *BX_find_command (const char *, int *); #define AWAY_ONE 0 #define AWAY_ALL 1 diff --git a/include/modval.h b/include/modval.h index 1281404..86bc82d 100644 --- a/include/modval.h +++ b/include/modval.h @@ -627,7 +627,7 @@ extern Function_ptr *global; #define io (*(void (*)(const char *))global[IRC_IO_FUNC]) /* commands.c */ -#define find_command (*(IrcCommand *(*)(const char *, int *))global[FIND_COMMAND_FUNC]) +#define find_command (*(const IrcCommand *(*)(const char *, int *))global[FIND_COMMAND_FUNC]) #define lock_stack_frame (*(void (*)(void ))global[LOCK_STACK_FRAME]) #define unlock_stack_frame (*(void (*)(void ))global[UNLOCK_STACK_FRAME]) diff --git a/source/alias.c b/source/alias.c index fa33cf6..d1ea1e6 100644 --- a/source/alias.c +++ b/source/alias.c @@ -2242,7 +2242,7 @@ char *lookup_member(char *varname, char *var_args, char *ptr, char *args) */ static char *glob_commands(const char *prefix, int *cnt) { - IrcCommand *var; + const IrcCommand *var; char *mylist = NULL; const size_t prefix_len = strlen(prefix); diff --git a/source/commands.c b/source/commands.c index 8bb7830..4865e0f 100644 --- a/source/commands.c +++ b/source/commands.c @@ -913,7 +913,7 @@ BUILT_IN_COMMAND(init_ftp) * returned and cnt is set to the number of matches * -1. Thus is 4 commands * matched, but the first was as exact match, cnt is -4. */ -IrcCommand *BX_find_command(const char *com, int *cnt) +const IrcCommand *BX_find_command(const char *com, int *cnt) { IrcCommand *retval; int loc; @@ -4114,7 +4114,7 @@ void command_completion(char unused, char *not_used) *cmdchars, *rest, firstcmdchar[2] = "/"; - IrcCommand *command; + const IrcCommand *command; #ifdef WANT_DLL IrcCommandDll *dll = NULL; #endif @@ -4542,7 +4542,7 @@ static unsigned int level = 0; *alias = NULL, *alias_name = NULL, *cline = NULL; - IrcCommand *command = NULL; + const IrcCommand *command = NULL; void *arglist = NULL; int cmd_cnt, alias_cnt = 0; @@ -5569,7 +5569,7 @@ BUILT_IN_COMMAND(returncmd) BUILT_IN_COMMAND(help) { - IrcCommand *cmd = NULL; + const IrcCommand *cmd = NULL; #ifdef WANT_DLL IrcCommandDll *cmddll = NULL; #endif