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.77 by root, Wed Nov 4 00:08:44 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 */
274
275int
276onoff_value (const char *line)
277{
278 int i;
279
280 if (sscanf (line, "%d", &i))
281 return (i != 0);
282 switch (line[0])
283 {
284 case 'o':
285 switch (line[1])
286 {
287 case 'n':
288 return 1; /* on */
289 default:
290 return 0; /* o[ff] */
291 }
292 case 'y': /* y[es] */
293 case 'k': /* k[ylla] */
294 case 's':
295 case 'd':
296 return 1;
297 case 'n': /* n[o] */
298 case 'e': /* e[i] */
299 case 'u':
300 default:
301 return 0;
302 }
303}
304
305int 270int
306command_title (object *op, char *params) 271command_title (object *op, char *params)
307{ 272{
308 char buf[MAX_BUF]; 273 char buf[MAX_BUF];
309 274

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines