1 | /* |
1 | /* |
2 | * static char *rcsid_c_new_c = |
2 | * static char *rcsid_c_new_c = |
3 | * "$Id: c_new.c,v 1.1 2006/02/03 07:14:28 root Exp $"; |
3 | * "$Id: c_new.c,v 1.2 2006/05/11 18:22:45 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
47 | int commsize) |
47 | int commsize) |
48 | { |
48 | { |
49 | CommArray_s *asp, dummy; |
49 | CommArray_s *asp, dummy; |
50 | char *cp; |
50 | char *cp; |
51 | |
51 | |
52 | for (cp=cmd; *cp; cp++) |
|
|
53 | *cp =tolower(*cp); |
|
|
54 | |
|
|
55 | dummy.name =cmd; |
52 | dummy.name =cmd; |
56 | asp =(CommArray_s *)bsearch((void *)&dummy, |
53 | asp =(CommArray_s *)bsearch((void *)&dummy, |
57 | (void *)commarray, commsize, |
54 | (void *)commarray, commsize, |
58 | sizeof(CommArray_s), compare_A); |
55 | sizeof(CommArray_s), compare_A); |
59 | return asp; |
56 | return asp; |
… | |
… | |
85 | } |
82 | } |
86 | |
83 | |
87 | csp = find_plugin_command(command,pl); |
84 | csp = find_plugin_command(command,pl); |
88 | |
85 | |
89 | if (!csp) |
86 | if (!csp) |
90 | csp = find_command_element(command, NewServerCommands, |
87 | csp = find_command_element(command, NewServerCommands, NewServerCommandSize); |
91 | NewServerCommandSize); |
|
|
92 | if (!csp) |
88 | if (!csp) |
93 | csp = find_command_element(command, Commands, CommandsSize); |
89 | csp = find_command_element(command, Commands, CommandsSize); |
94 | if (!csp) |
90 | if (!csp) |
95 | csp = find_command_element(command, CommunicationCommands, CommunicationCommandSize); |
91 | csp = find_command_element(command, CommunicationCommands, CommunicationCommandSize); |
96 | if (!csp && QUERY_FLAG(pl, FLAG_WIZ)) |
92 | if (!csp && QUERY_FLAG(pl, FLAG_WIZ)) |