version 1.42 | | version 1.43 |
---|
| | |
/* | | /* |
* static char *rcsid_c_misc_c = | | * static char *rcsid_c_misc_c = |
* "$Id: c_misc.c,v 1.42 2004/10/10 15:01:26 ryo_saeba Exp $"; | | * "$Id: c_misc.c,v 1.43 2004/10/18 02:20:00 temitchell Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
int command_who (object *op, char *params) | | int command_who (object *op, char *params) |
{ | | { |
player *pl; | | player *pl; |
| | char namebuf[MAX_BUF]; |
char buf[MAX_BUF]; | | char buf[MAX_BUF]; |
| | |
if (first_player != (player *) NULL) | | if (first_player != (player *) NULL) |
| | |
| | |
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(buf,"%s the level %d %s (@%s) [%s]%s%s%s (%d)", | | (void) sprintf(namebuf,"%s the %s:",pl->ob->name, |
pl->ob->name, | | (pl->own_title[0]=='\0'?pl->title:pl->own_title)); |
| | (void) sprintf(buf,"Level %d (@%s) [%s]%s%s%s (%d)", |
pl->ob->level, | | pl->ob->level, |
(pl->own_title[0]=='\0'?pl->title:pl->own_title), | | |
pl->socket.host, | | pl->socket.host, |
pl->ob->map->path, | | pl->ob->map->path, |
QUERY_FLAG(pl->ob,FLAG_WIZ)?" [WIZ]":"", | | QUERY_FLAG(pl->ob,FLAG_WIZ)?" [WIZ]":"", |
pl->hidden?"[HID]":"", | | pl->hidden?"[HID]":"", |
pl->peaceful?"Peaceful":"Hostile",pl->ob->count); | | pl->peaceful?"Peaceful":"Hostile",pl->ob->count); |
else | | }else{ |
(void) sprintf(buf,"%s the %s [%s]%s%s",pl->ob->name, | | (void) sprintf(namebuf,"%s the %s:",pl->ob->name, |
(pl->own_title[0]=='\0'?pl->title:pl->own_title), | | (pl->own_title[0]=='\0'?pl->title:pl->own_title)); |
| | sprintf(buf,"[%s]%s%s", |
pl->ob->map->path, | | pl->ob->map->path, |
QUERY_FLAG(pl->ob,FLAG_WIZ)?" [WIZ]":"", | | QUERY_FLAG(pl->ob,FLAG_WIZ)?" [WIZ]":"", |
pl->peaceful?"Peaceful":"Hostile"); | | pl->peaceful?"Peaceful":"Hostile");} |
| | new_draw_info(NDI_UNIQUE, 0, op, namebuf); |
new_draw_info(NDI_UNIQUE, 0,op,buf); | | new_draw_info(NDI_UNIQUE, 0,op,buf); |
} | | } |
} | | } |