… | |
… | |
201 | {"create", command_create, 0.0}, |
201 | {"create", command_create, 0.0}, |
202 | {"debug", command_debug, 0.0}, |
202 | {"debug", command_debug, 0.0}, |
203 | {"dump", command_dump, 0.0}, |
203 | {"dump", command_dump, 0.0}, |
204 | {"dumpbelow", command_dumpbelow, 0.0}, |
204 | {"dumpbelow", command_dumpbelow, 0.0}, |
205 | {"dumpfriendlyobjects", command_dumpfriendlyobjects, 0.0}, |
205 | {"dumpfriendlyobjects", command_dumpfriendlyobjects, 0.0}, |
206 | {"dumpallarchetypes", command_dumpallarchetypes, 0.0}, |
|
|
207 | {"dumpallmaps", command_dumpallmaps, 0.0}, |
206 | {"dumpallmaps", command_dumpallmaps, 0.0}, |
208 | {"dumpallobjects", command_dumpallobjects, 0.0}, |
|
|
209 | {"dumpmap", command_dumpmap, 0.0}, |
207 | {"dumpmap", command_dumpmap, 0.0}, |
210 | {"forget_spell", command_forget_spell, 0.0}, |
208 | {"forget_spell", command_forget_spell, 0.0}, |
211 | {"free", command_free, 0.0}, |
209 | {"free", command_free, 0.0}, |
212 | {"freeze", command_freeze, 0.0}, |
210 | {"freeze", command_freeze, 0.0}, |
213 | {"hide", command_hide, 0.0}, |
211 | {"hide", command_hide, 0.0}, |
… | |
… | |
236 | {"stack_push", command_stack_push, 0.0}, |
234 | {"stack_push", command_stack_push, 0.0}, |
237 | {"stats", command_stats, 0.0}, |
235 | {"stats", command_stats, 0.0}, |
238 | {"style_info", command_style_map_info, 0.0}, /* Costly command, so make it wiz only */ |
236 | {"style_info", command_style_map_info, 0.0}, /* Costly command, so make it wiz only */ |
239 | {"summon", command_summon, 0.0}, |
237 | {"summon", command_summon, 0.0}, |
240 | {"teleport", command_teleport, 0.0}, |
238 | {"teleport", command_teleport, 0.0}, |
241 | {"wizpass", command_wizpass, 0.0}, |
|
|
242 | {"wizcast", command_wizcast, 0.0}, |
|
|
243 | {"overlay_save", command_save_overlay, 0.0}, |
239 | {"overlay_save", command_save_overlay, 0.0}, |
244 | |
240 | |
245 | /* {"possess", command_possess, 0.0}, */ |
241 | /* {"possess", command_possess, 0.0}, */ |
246 | {"mon_aggr", command_mon_aggr, 0.0}, |
242 | {"mon_aggr", command_mon_aggr, 0.0}, |
247 | }; |
243 | }; |
… | |
… | |
287 | qsort (WizCommands, WizCommandsSize, sizeof (CommArray_s), compare_A); |
283 | qsort (WizCommands, WizCommandsSize, sizeof (CommArray_s), compare_A); |
288 | qsort (Socket_Commands, Socket_CommandsSize, sizeof (CommArray_s), compare_A); |
284 | qsort (Socket_Commands, Socket_CommandsSize, sizeof (CommArray_s), compare_A); |
289 | qsort (Socket2_Commands, Socket2_CommandsSize, sizeof (CommArray_s), compare_A); |
285 | qsort (Socket2_Commands, Socket2_CommandsSize, sizeof (CommArray_s), compare_A); |
290 | } |
286 | } |
291 | |
287 | |
292 | #ifndef tolower |
|
|
293 | # define tolower(C) (((C) >= 'A' && (C) <= 'Z')? (C) - 'A' + 'a': (C)) |
|
|
294 | #endif |
|
|
295 | |
|
|
296 | |
|
|
297 | CommFunc |
|
|
298 | find_oldsocket_command (char *cmd) |
|
|
299 | { |
|
|
300 | CommArray_s *asp, dummy; |
|
|
301 | char *cp; |
|
|
302 | |
|
|
303 | for (cp = cmd; *cp; cp++) |
|
|
304 | { |
|
|
305 | *cp = tolower (*cp); |
|
|
306 | } |
|
|
307 | |
|
|
308 | dummy.name = cmd; |
|
|
309 | asp = (CommArray_s *) bsearch ((void *) &dummy, (void *) Socket_Commands, Socket_CommandsSize, sizeof (CommArray_s), compare_A); |
|
|
310 | if (asp) |
|
|
311 | return asp->func; |
|
|
312 | return NULL; |
|
|
313 | } |
|
|
314 | |
|
|
315 | CommFunc |
|
|
316 | find_oldsocket_command2 (char *cmd) |
|
|
317 | { |
|
|
318 | CommArray_s *asp, dummy; |
|
|
319 | char *cp; |
|
|
320 | |
|
|
321 | for (cp = cmd; *cp; cp++) |
|
|
322 | { |
|
|
323 | *cp = tolower (*cp); |
|
|
324 | } |
|
|
325 | |
|
|
326 | dummy.name = cmd; |
|
|
327 | asp = (CommArray_s *) bsearch ((void *) &dummy, (void *) Socket2_Commands, Socket2_CommandsSize, sizeof (CommArray_s), compare_A); |
|
|
328 | if (asp) |
|
|
329 | return asp->func; |
|
|
330 | return NULL; |
|
|
331 | } |
|
|