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.7 2006/09/03 00:18:42 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 | |
… | |
… | |
50 | |
50 | |
51 | {"sound", command_sound, 0.0}, |
51 | {"sound", command_sound, 0.0}, |
52 | {"party", command_party, 0.0}, |
52 | {"party", command_party, 0.0}, |
53 | {"gsay", command_gsay, 1.0}, |
53 | {"gsay", command_gsay, 1.0}, |
54 | |
54 | |
55 | #ifdef DEBUG |
|
|
56 | {"sstable", command_sstable, 0.0}, |
|
|
57 | #endif |
|
|
58 | {"apply", command_apply, 1.0}, /* should be variable */ |
55 | {"apply", command_apply, 1.0}, /* should be variable */ |
59 | {"applymode", command_applymode, 1.0}, /* should be variable */ |
56 | {"applymode", command_applymode, 1.0}, /* should be variable */ |
60 | {"archs", command_archs, 0.0}, |
57 | {"archs", command_archs, 0.0}, |
61 | {"body", command_body, 0.0}, |
58 | {"body", command_body, 0.0}, |
62 | {"brace", command_brace, 0.0}, |
59 | {"brace", command_brace, 0.0}, |
… | |
… | |
91 | {"rename", command_rename_item, 0.0}, |
88 | {"rename", command_rename_item, 0.0}, |
92 | {"resistances", command_resistances, 0.0}, |
89 | {"resistances", command_resistances, 0.0}, |
93 | {"rotateshoottype", command_rotateshoottype, 0.0}, |
90 | {"rotateshoottype", command_rotateshoottype, 0.0}, |
94 | {"skills", command_skills, 0.0}, /* shows player list of skills */ |
91 | {"skills", command_skills, 0.0}, /* shows player list of skills */ |
95 | {"use_skill", command_uskill, 1.0}, |
92 | {"use_skill", command_uskill, 1.0}, |
96 | {"quests", command_quests, 0.0}, |
|
|
97 | {"ready_skill", command_rskill, 1.0}, |
93 | {"ready_skill", command_rskill, 1.0}, |
98 | {"search",command_search, 1.0}, |
94 | {"search",command_search, 1.0}, |
99 | {"search-items", command_search_items, 0.0}, |
95 | {"search-items", command_search_items, 0.0}, |
100 | {"showpets", command_showpets, 1.0}, |
96 | {"showpets", command_showpets, 1.0}, |
101 | {"statistics", command_statistics, 0.0}, |
97 | {"statistics", command_statistics, 0.0}, |
102 | {"strings", command_strings, 0.0}, |
|
|
103 | {"take", command_take, 1.0}, |
98 | {"take", command_take, 1.0}, |
104 | {"throw", command_throw, 1.0}, |
99 | {"throw", command_throw, 1.0}, |
105 | {"time", command_time, 0.0}, |
100 | {"time", command_time, 0.0}, |
106 | {"weather", command_weather, 0.0}, |
101 | {"weather", command_weather, 0.0}, |
107 | {"whereabouts", command_whereabouts, 0.0}, |
102 | {"whereabouts", command_whereabouts, 0.0}, |
… | |
… | |
114 | {"wimpy", command_wimpy, 0.0}, |
109 | {"wimpy", command_wimpy, 0.0}, |
115 | {"who", command_who, 0.0}, |
110 | {"who", command_who, 0.0}, |
116 | {"afk", command_afk, 0.0}, |
111 | {"afk", command_afk, 0.0}, |
117 | |
112 | |
118 | {"stay", command_stay, 1.0}, /* 1.0 because it is used when using a |
113 | {"stay", command_stay, 1.0}, /* 1.0 because it is used when using a |
119 | * skill on yourself */ |
114 | * skill on yourself */ |
120 | {"north", command_north, 1.0}, |
115 | {"north", command_north, 1.0}, |
121 | {"east", command_east, 1.0}, |
116 | {"east", command_east, 1.0}, |
122 | {"south", command_south, 1.0}, |
117 | {"south", command_south, 1.0}, |
123 | {"west", command_west, 1.0}, |
118 | {"west", command_west, 1.0}, |
124 | {"northeast", command_northeast, 1.0}, |
119 | {"northeast", command_northeast, 1.0}, |
… | |
… | |
210 | {"addexp", command_addexp,0.0}, |
205 | {"addexp", command_addexp,0.0}, |
211 | {"arrest", command_arrest,0.0}, |
206 | {"arrest", command_arrest,0.0}, |
212 | {"banish", command_banish,0.0}, |
207 | {"banish", command_banish,0.0}, |
213 | {"create", command_create,0.0}, |
208 | {"create", command_create,0.0}, |
214 | {"debug", command_debug,0.0}, |
209 | {"debug", command_debug,0.0}, |
215 | {"diff", command_diff, 0.0 }, |
|
|
216 | {"dump", command_dump,0.0}, |
210 | {"dump", command_dump,0.0}, |
217 | {"dumpbelow", command_dumpbelow,0.0}, |
211 | {"dumpbelow", command_dumpbelow,0.0}, |
218 | {"dumpfriendlyobjects", command_dumpfriendlyobjects,0.0}, |
212 | {"dumpfriendlyobjects", command_dumpfriendlyobjects,0.0}, |
219 | {"dumpallarchetypes", command_dumpallarchetypes,0.0}, |
213 | {"dumpallarchetypes", command_dumpallarchetypes,0.0}, |
220 | {"dumpallmaps", command_dumpallmaps,0.0}, |
214 | {"dumpallmaps", command_dumpallmaps,0.0}, |
… | |
… | |
243 | {"patch", command_patch,0.0}, |
237 | {"patch", command_patch,0.0}, |
244 | {"remove", command_remove,0.0}, |
238 | {"remove", command_remove,0.0}, |
245 | {"reset", command_reset,0.0}, |
239 | {"reset", command_reset,0.0}, |
246 | {"set_god", command_setgod, 0.0}, |
240 | {"set_god", command_setgod, 0.0}, |
247 | {"shutdown", command_shutdown, 0.0}, |
241 | {"shutdown", command_shutdown, 0.0}, |
248 | {"ssdumptable", command_ssdumptable,0.0}, |
|
|
249 | {"stack_clear", command_stack_clear, 0.0 }, |
242 | {"stack_clear", command_stack_clear, 0.0 }, |
250 | {"stack_list", command_stack_list, 0.0}, |
243 | {"stack_list", command_stack_list, 0.0}, |
251 | {"stack_pop", command_stack_pop, 0.0 }, |
244 | {"stack_pop", command_stack_pop, 0.0 }, |
252 | {"stack_push", command_stack_push, 0.0 }, |
245 | {"stack_push", command_stack_push, 0.0 }, |
253 | {"stats", command_stats,0.0}, |
246 | {"stats", command_stats,0.0}, |
… | |
… | |
318 | *cp =tolower(*cp); |
311 | *cp =tolower(*cp); |
319 | } |
312 | } |
320 | |
313 | |
321 | dummy.name =cmd; |
314 | dummy.name =cmd; |
322 | asp =(CommArray_s *)bsearch((void *)&dummy, |
315 | asp =(CommArray_s *)bsearch((void *)&dummy, |
323 | (void *)Socket_Commands, Socket_CommandsSize, |
316 | (void *)Socket_Commands, Socket_CommandsSize, |
324 | sizeof(CommArray_s), compare_A); |
317 | sizeof(CommArray_s), compare_A); |
325 | if (asp) |
318 | if (asp) |
326 | return asp->func; |
319 | return asp->func; |
327 | return NULL; |
320 | return NULL; |
328 | } |
321 | } |
329 | |
322 | |
… | |
… | |
336 | *cp =tolower(*cp); |
329 | *cp =tolower(*cp); |
337 | } |
330 | } |
338 | |
331 | |
339 | dummy.name =cmd; |
332 | dummy.name =cmd; |
340 | asp =(CommArray_s *)bsearch((void *)&dummy, |
333 | asp =(CommArray_s *)bsearch((void *)&dummy, |
341 | (void *)Socket2_Commands, Socket2_CommandsSize, |
334 | (void *)Socket2_Commands, Socket2_CommandsSize, |
342 | sizeof(CommArray_s), compare_A); |
335 | sizeof(CommArray_s), compare_A); |
343 | if (asp) |
336 | if (asp) |
344 | return asp->func; |
337 | return asp->func; |
345 | return NULL; |
338 | return NULL; |
346 | } |
339 | } |