ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/commands.C
(Generate patch)

Comparing deliantra/server/server/commands.C (file contents):
Revision 1.3 by root, Sat Aug 26 23:36:34 2006 UTC vs.
Revision 1.6 by root, Thu Aug 31 17:54:15 2006 UTC

1/* 1/*
2 * static char *rcsid_commands_c = 2 * static char *rcsid_commands_c =
3 * "$Id: commands.C,v 1.3 2006/08/26 23:36:34 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},
129 129
130const int CommandsSize =sizeof(Commands) / sizeof(CommArray_s); 130const int CommandsSize =sizeof(Commands) / sizeof(CommArray_s);
131 131
132CommArray_s CommunicationCommands [] = { 132CommArray_s CommunicationCommands [] = {
133 /* begin emotions */ 133 /* begin emotions */
134 {"tell", command_tell, 0.1},
135 {"reply", command_reply, 0.0},
136 {"say", command_say, 0.1},
137 {"shout", command_shout, 0.1},
138 {"chat", command_chat, 0.1},
139 {"me", command_me, 0.1}, 134 {"me", command_me, 0.1},
140 {"nod", command_nod, 0.0}, 135 {"nod", command_nod, 0.0},
141 {"dance", command_dance, 0.0}, 136 {"dance", command_dance, 0.0},
142 {"kiss", command_kiss, 0.0}, 137 {"kiss", command_kiss, 0.0},
143 {"bounce", command_bounce, 0.0}, 138 {"bounce", command_bounce, 0.0},
215 {"addexp", command_addexp,0.0}, 210 {"addexp", command_addexp,0.0},
216 {"arrest", command_arrest,0.0}, 211 {"arrest", command_arrest,0.0},
217 {"banish", command_banish,0.0}, 212 {"banish", command_banish,0.0},
218 {"create", command_create,0.0}, 213 {"create", command_create,0.0},
219 {"debug", command_debug,0.0}, 214 {"debug", command_debug,0.0},
220 {"diff", command_diff, 0.0 },
221 {"dump", command_dump,0.0}, 215 {"dump", command_dump,0.0},
222 {"dumpbelow", command_dumpbelow,0.0}, 216 {"dumpbelow", command_dumpbelow,0.0},
223 {"dumpfriendlyobjects", command_dumpfriendlyobjects,0.0}, 217 {"dumpfriendlyobjects", command_dumpfriendlyobjects,0.0},
224 {"dumpallarchetypes", command_dumpallarchetypes,0.0}, 218 {"dumpallarchetypes", command_dumpallarchetypes,0.0},
225 {"dumpallmaps", command_dumpallmaps,0.0}, 219 {"dumpallmaps", command_dumpallmaps,0.0},
257 {"stack_push", command_stack_push, 0.0 }, 251 {"stack_push", command_stack_push, 0.0 },
258 {"stats", command_stats,0.0}, 252 {"stats", command_stats,0.0},
259 {"style_info", command_style_map_info, 0.0}, /* Costly command, so make it wiz only */ 253 {"style_info", command_style_map_info, 0.0}, /* Costly command, so make it wiz only */
260 {"summon", command_summon,0.0}, 254 {"summon", command_summon,0.0},
261 {"teleport", command_teleport,0.0}, 255 {"teleport", command_teleport,0.0},
262 {"toggle_shout", command_toggle_shout,0.0},
263 {"wizpass", command_wizpass,0.0}, 256 {"wizpass", command_wizpass,0.0},
264 {"wizcast", command_wizcast,0.0}, 257 {"wizcast", command_wizcast,0.0},
265 {"overlay_save", command_save_overlay, 0.0}, 258 {"overlay_save", command_save_overlay, 0.0},
266/* {"possess", command_possess, 0.0}, */ 259/* {"possess", command_possess, 0.0}, */
267 {"mon_aggr", command_mon_aggr, 0.0}, 260 {"mon_aggr", command_mon_aggr, 0.0},
287 280
288/* Socket commands - these should really do nothing more than output things 281/* Socket commands - these should really do nothing more than output things
289 * to the various players/sockets. 282 * to the various players/sockets.
290 */ 283 */
291CommArray_s Socket2_Commands[] = { 284CommArray_s Socket2_Commands[] = {
292 {"shout", command_shout, 0.1},
293 {"chat", command_chat, 0.1},
294 {"tell", command_tell, 0.1},
295}; 285};
296 286
297const int Socket2_CommandsSize =sizeof(Socket2_Commands) / sizeof(CommArray_s); 287const int Socket2_CommandsSize =sizeof(Socket2_Commands) / sizeof(CommArray_s);
298 288
299 289
327 *cp =tolower(*cp); 317 *cp =tolower(*cp);
328 } 318 }
329 319
330 dummy.name =cmd; 320 dummy.name =cmd;
331 asp =(CommArray_s *)bsearch((void *)&dummy, 321 asp =(CommArray_s *)bsearch((void *)&dummy,
332 (void *)Socket_Commands, Socket_CommandsSize, 322 (void *)Socket_Commands, Socket_CommandsSize,
333 sizeof(CommArray_s), compare_A); 323 sizeof(CommArray_s), compare_A);
334 if (asp) 324 if (asp)
335 return asp->func; 325 return asp->func;
336 return NULL; 326 return NULL;
337} 327}
338 328
345 *cp =tolower(*cp); 335 *cp =tolower(*cp);
346 } 336 }
347 337
348 dummy.name =cmd; 338 dummy.name =cmd;
349 asp =(CommArray_s *)bsearch((void *)&dummy, 339 asp =(CommArray_s *)bsearch((void *)&dummy,
350 (void *)Socket2_Commands, Socket2_CommandsSize, 340 (void *)Socket2_Commands, Socket2_CommandsSize,
351 sizeof(CommArray_s), compare_A); 341 sizeof(CommArray_s), compare_A);
352 if (asp) 342 if (asp)
353 return asp->func; 343 return asp->func;
354 return NULL; 344 return NULL;
355} 345}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines