version 1.46 | | version 1.47 |
---|
| | |
/* | | /* |
* static char *rcsid_c_misc_c = | | * static char *rcsid_c_misc_c = |
* "$Id: c_misc.c,v 1.46 2004/10/18 03:25:57 temitchell Exp $"; | | * "$Id: c_misc.c,v 1.47 2005/03/13 15:48:17 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
if (pl->state==ST_PLAYING || pl->state==ST_GET_PARTY_PASSWORD) { | | if (pl->state==ST_PLAYING || pl->state==ST_GET_PARTY_PASSWORD) { |
| | |
if(op == NULL || QUERY_FLAG(op, FLAG_WIZ)){ | | if(op == NULL || QUERY_FLAG(op, FLAG_WIZ)){ |
(void) sprintf(namebuf,"%s the %s%s%s%s:", | | (void) sprintf(namebuf,"%s the %s%s%s%s%s:", |
pl->ob->name, | | pl->ob->name, |
(pl->own_title[0]=='\0'?pl->title:pl->own_title), | | (pl->own_title[0]=='\0'?pl->title:pl->own_title), |
pl->peaceful?"":" [Hostile]", | | pl->peaceful?"":" [Hostile]", |
QUERY_FLAG(pl->ob,FLAG_WIZ)?" [WIZ]":"", | | QUERY_FLAG(pl->ob,FLAG_WIZ)?" [WIZ]":"", |
pl->hidden?" [HID]":""); | | pl->hidden?" [HID]":"", |
| | QUERY_FLAG(pl->ob,FLAG_AFK)?" [AFK]":""); |
(void) sprintf(buf," Level %d [%s](@%s)(%d)", | | (void) sprintf(buf," Level %d [%s](@%s)(%d)", |
pl->ob->level, | | pl->ob->level, |
pl->ob->map->path, | | pl->ob->map->path, |
| | |
pl->ob->count); | | pl->ob->count); |
} | | } |
else{ | | else{ |
(void) sprintf(namebuf,"%s the %s%s%s:", | | (void) sprintf(namebuf,"%s the %s%s%s%s:", |
pl->ob->name, | | pl->ob->name, |
(pl->own_title[0]=='\0'?pl->title:pl->own_title), | | (pl->own_title[0]=='\0'?pl->title:pl->own_title), |
pl->peaceful?"":" [Hostile]", | | pl->peaceful?"":" [Hostile]", |
QUERY_FLAG(pl->ob,FLAG_WIZ)?" [WIZ]":""); | | QUERY_FLAG(pl->ob,FLAG_WIZ)?" [WIZ]":"", |
| | QUERY_FLAG(pl->ob,FLAG_AFK)?" [AFK]":""); |
(void) sprintf(buf," [%s]", | | (void) sprintf(buf," [%s]", |
pl->ob->map->path); | | pl->ob->map->path); |
} | | } |
| | |
return 1; | | return 1; |
} | | } |
| | |
| | int command_afk (object *op, char *params) |
| | { |
| | if QUERY_FLAG(op,FLAG_AFK) { |
| | CLEAR_FLAG(op,FLAG_AFK); |
| | new_draw_info(NDI_UNIQUE, 0, op, "You are no longer AFK"); |
| | } |
| | else |
| | { |
| | SET_FLAG(op,FLAG_AFK); |
| | new_draw_info(NDI_UNIQUE, 0, op, "You are now AFK"); |
| | } |
| | return 1; |
| | } |
| | |
int command_malloc (object *op, char *params) | | int command_malloc (object *op, char *params) |
{ | | { |
malloc_info(op); | | malloc_info(op); |