version 1.15 | | version 1.16 |
---|
| | |
/* | | /* |
* static char *rcsid_c_object_c = | | * static char *rcsid_c_object_c = |
* "$Id: c_object.c,v 1.15 2000/12/18 07:38:25 cvs Exp $"; | | * "$Id: c_object.c,v 1.16 2001/03/22 06:45:05 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
else count=pl->contr->count; | | else count=pl->contr->count; |
if (!cp || cp[0]=='\0' || count<0) return 0; | | if (!cp || cp[0]=='\0' || count<0) return 0; |
/* base name matched - not bad */ | | /* base name matched - not bad */ |
if (strcasecmp(cp,op->name)==0 && !count) return 4; | | if (strcasecmp(cp,op->name)==0 && !count) retval=24; |
else if (count>1) { /* Need to plurify name for proper match */ | | else if (count>1) { /* Need to plurify name for proper match */ |
char newname[MAX_BUF]; | | char newname[MAX_BUF]; |
strcpy(newname, op->name); | | strcpy(newname, op->name); |
| | |
else strcat(newname,"s"); | | else strcat(newname,"s"); |
if (!strcasecmp(newname,cp)) { | | if (!strcasecmp(newname,cp)) { |
pl->contr->count=count; /* May not do anything */ | | pl->contr->count=count; /* May not do anything */ |
return 6; | | retval=26; |
} | | } |
} | | } |
else if (count==1) { | | else if (count==1) { |
if (!strcasecmp(op->name,cp)) { | | if (!strcasecmp(op->name,cp)) { |
pl->contr->count=count; /* May not do anything */ | | pl->contr->count=count; /* May not do anything */ |
return 6; | | retval=26; |
} | | } |
} | | } |
if (!strcasecmp(cp,query_name(op))) retval=20; | | if (!strcasecmp(cp,query_name(op))) retval=20; |