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

Comparing deliantra/server/server/c_misc.C (file contents):
Revision 1.78 by root, Fri Nov 6 13:03:34 2009 UTC vs.
Revision 1.79 by root, Fri Nov 6 13:31:47 2009 UTC

265 op->contr->infobox (MSG_CHANNEL ("resistances"), msg); 265 op->contr->infobox (MSG_CHANNEL ("resistances"), msg);
266 266
267 return 0; 267 return 0;
268} 268}
269 269
270/*
271 * Actual commands.
272 * Those should be in small separate files (c_object.c, c_wiz.c, cmove.c,...)
273 */
274static int
275onoff_value (const char *line)
276{
277 int i;
278
279 if (sscanf (line, "%d", &i))
280 return (i != 0);
281 switch (line[0])
282 {
283 case 'o':
284 switch (line[1])
285 {
286 case 'n':
287 return 1; /* on */
288 default:
289 return 0; /* o[ff] */
290 }
291 case 'y': /* y[es] */
292 case 'k': /* k[ylla] */
293 case 's':
294 case 'd':
295 return 1;
296 case 'n': /* n[o] */
297 case 'e': /* e[i] */
298 case 'u':
299 default:
300 return 0;
301 }
302}
303
304int 270int
305command_title (object *op, char *params) 271command_title (object *op, char *params)
306{ 272{
307 char buf[MAX_BUF]; 273 char buf[MAX_BUF];
308 274

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines