version 1.16 | | version 1.17 |
---|
| | |
/* | | /* |
* static char *rcsid_commands_c = | | * static char *rcsid_commands_c = |
* "$Id: commands.c,v 1.16 2001/10/30 02:30:20 michtoen Exp $"; | | * "$Id: commands.c,v 1.17 2001/11/11 09:39:54 gros Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
if (asp) | | if (asp) |
return asp->func; | | return asp->func; |
else | | else |
{ | | |
/* GROS - If we are here, then maybe this is a plugin-provided command ? */ | | |
asp = find_plugin_command(cmd); | | |
if (asp) | | |
return asp->func; | | |
else | | |
return NULL; | | return NULL; |
}; | | }; |
}; | | |
} | | } |
| | |
static CommFunc find_wizcommand(char *cmd) | | static CommFunc find_wizcommand(char *cmd) |
| | |
{ | | { |
CommFunc f; | | CommFunc f; |
char *cp; | | char *cp; |
| | CommArray_s *asp; |
| | |
#ifdef INPUT_DEBUG | | #ifdef INPUT_DEBUG |
LOG(llevDebug, "Command: '%s'\n", str); | | LOG(llevDebug, "Command: '%s'\n", str); |
| | |
* No arguments? | | * No arguments? |
*/ | | */ |
if (!(cp=strchr(str, ' '))) { | | if (!(cp=strchr(str, ' '))) { |
| | /* GROS - If we are here, then maybe this is a plugin-provided command ? */ |
| | asp = find_plugin_command(str, op); |
| | if (asp) |
| | return asp->func(op, NULL); |
| | |
if ((f=find_command(str))) | | if ((f=find_command(str))) |
return f(op, NULL); | | return f(op, NULL); |
if (QUERY_FLAG(op,FLAG_WIZ) && (f=find_wizcommand(str))) | | if (QUERY_FLAG(op,FLAG_WIZ) && (f=find_wizcommand(str))) |
| | |
/* Clear all spaces from the start of the optional argument */ | | /* Clear all spaces from the start of the optional argument */ |
while (*cp==' ') cp++; | | while (*cp==' ') cp++; |
| | |
| | asp = find_plugin_command(str,op); |
| | if (asp) return asp->func(op,cp); |
| | |
if ((f=find_command(str))) | | if ((f=find_command(str))) |
return f(op, cp); | | return f(op, cp); |
if (QUERY_FLAG(op, FLAG_WIZ) && (f=find_wizcommand(str))) | | if (QUERY_FLAG(op, FLAG_WIZ) && (f=find_wizcommand(str))) |