1 | /* |
1 | /* |
2 | * static char *rcsid_commands_c = |
2 | * static char *rcsid_commands_c = |
3 | * "$Id: commands.C,v 1.4 2006/08/29 05:03:55 root Exp $"; |
3 | * "$Id: commands.C,v 1.6 2006/08/31 17:54:15 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 | |
… | |
… | |
114 | {"wimpy", command_wimpy, 0.0}, |
114 | {"wimpy", command_wimpy, 0.0}, |
115 | {"who", command_who, 0.0}, |
115 | {"who", command_who, 0.0}, |
116 | {"afk", command_afk, 0.0}, |
116 | {"afk", command_afk, 0.0}, |
117 | |
117 | |
118 | {"stay", command_stay, 1.0}, /* 1.0 because it is used when using a |
118 | {"stay", command_stay, 1.0}, /* 1.0 because it is used when using a |
119 | * skill on yourself */ |
119 | * skill on yourself */ |
120 | {"north", command_north, 1.0}, |
120 | {"north", command_north, 1.0}, |
121 | {"east", command_east, 1.0}, |
121 | {"east", command_east, 1.0}, |
122 | {"south", command_south, 1.0}, |
122 | {"south", command_south, 1.0}, |
123 | {"west", command_west, 1.0}, |
123 | {"west", command_west, 1.0}, |
124 | {"northeast", command_northeast, 1.0}, |
124 | {"northeast", command_northeast, 1.0}, |
… | |
… | |
210 | {"addexp", command_addexp,0.0}, |
210 | {"addexp", command_addexp,0.0}, |
211 | {"arrest", command_arrest,0.0}, |
211 | {"arrest", command_arrest,0.0}, |
212 | {"banish", command_banish,0.0}, |
212 | {"banish", command_banish,0.0}, |
213 | {"create", command_create,0.0}, |
213 | {"create", command_create,0.0}, |
214 | {"debug", command_debug,0.0}, |
214 | {"debug", command_debug,0.0}, |
215 | {"diff", command_diff, 0.0 }, |
|
|
216 | {"dump", command_dump,0.0}, |
215 | {"dump", command_dump,0.0}, |
217 | {"dumpbelow", command_dumpbelow,0.0}, |
216 | {"dumpbelow", command_dumpbelow,0.0}, |
218 | {"dumpfriendlyobjects", command_dumpfriendlyobjects,0.0}, |
217 | {"dumpfriendlyobjects", command_dumpfriendlyobjects,0.0}, |
219 | {"dumpallarchetypes", command_dumpallarchetypes,0.0}, |
218 | {"dumpallarchetypes", command_dumpallarchetypes,0.0}, |
220 | {"dumpallmaps", command_dumpallmaps,0.0}, |
219 | {"dumpallmaps", command_dumpallmaps,0.0}, |
… | |
… | |
318 | *cp =tolower(*cp); |
317 | *cp =tolower(*cp); |
319 | } |
318 | } |
320 | |
319 | |
321 | dummy.name =cmd; |
320 | dummy.name =cmd; |
322 | asp =(CommArray_s *)bsearch((void *)&dummy, |
321 | asp =(CommArray_s *)bsearch((void *)&dummy, |
323 | (void *)Socket_Commands, Socket_CommandsSize, |
322 | (void *)Socket_Commands, Socket_CommandsSize, |
324 | sizeof(CommArray_s), compare_A); |
323 | sizeof(CommArray_s), compare_A); |
325 | if (asp) |
324 | if (asp) |
326 | return asp->func; |
325 | return asp->func; |
327 | return NULL; |
326 | return NULL; |
328 | } |
327 | } |
329 | |
328 | |
… | |
… | |
336 | *cp =tolower(*cp); |
335 | *cp =tolower(*cp); |
337 | } |
336 | } |
338 | |
337 | |
339 | dummy.name =cmd; |
338 | dummy.name =cmd; |
340 | asp =(CommArray_s *)bsearch((void *)&dummy, |
339 | asp =(CommArray_s *)bsearch((void *)&dummy, |
341 | (void *)Socket2_Commands, Socket2_CommandsSize, |
340 | (void *)Socket2_Commands, Socket2_CommandsSize, |
342 | sizeof(CommArray_s), compare_A); |
341 | sizeof(CommArray_s), compare_A); |
343 | if (asp) |
342 | if (asp) |
344 | return asp->func; |
343 | return asp->func; |
345 | return NULL; |
344 | return NULL; |
346 | } |
345 | } |