version 1.51 | | version 1.52 |
---|
| | |
/* | | /* |
* static char *rcsid_c_misc_c = | | * static char *rcsid_c_misc_c = |
* "$Id: c_misc.c,v 1.51 2005/03/22 02:39:50 majorwoo Exp $"; | | * "$Id: c_misc.c,v 1.52 2005/03/22 23:22:42 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
else | | else |
new_draw_info(NDI_UNIQUE, 0,op,"Heap checks out OK."); | | new_draw_info(NDI_UNIQUE, 0,op,"Heap checks out OK."); |
return 1; | | return 1; |
yea } | | } |
#endif | | #endif |
| | |
int command_who (object *op, char *params) { | | |
player *pl; | | |
uint16 i; | | |
char tmpbuf[HUGE_BUF]; | | |
int num_players = 0; | | |
int num_wiz = 0; | | |
int num_afk = 0; | | |
char players_str[MAX_BUF]; | | |
typedef struct | | typedef struct |
{ | | { |
char namebuf[MAX_BUF]; | | char namebuf[MAX_BUF]; |
int login_order; | | int login_order; |
} chars_names; | | } chars_names; |
chars_names *chars = NULL; | | |
/*local functon for qsort comparison*/ | | /*local functon for qsort comparison*/ |
int name_cmp (chars_names *c1, chars_names *c2) | | int name_cmp (chars_names *c1, chars_names *c2) |
{ | | { |
return strcasecmp (c1->namebuf, c2->namebuf); | | return strcasecmp (c1->namebuf, c2->namebuf); |
} | | } |
| | |
| | int command_who (object *op, char *params) { |
| | player *pl; |
| | uint16 i; |
| | char tmpbuf[HUGE_BUF]; |
| | int num_players = 0; |
| | int num_wiz = 0; |
| | int num_afk = 0; |
| | char players_str[MAX_BUF]; |
| | chars_names *chars = NULL; |
| | |
/* | | /* |
* The who formats are defined in config to be blank. They should have been | | * The who formats are defined in config to be blank. They should have been |
* overridden by the settings file, if there are no entries however, it will | | * overridden by the settings file, if there are no entries however, it will |
| | |
* _ a literal underscore | | * _ a literal underscore |
*/ | | */ |
| | |
void *get_who_escape_code_value(char *return_val, const char letter, player *pl) { | | void get_who_escape_code_value(char *return_val, const char letter, player *pl) { |
| | |
switch (letter) { | | switch (letter) { |
case 'N' : strcpy(return_val, pl->ob->name); | | case 'N' : strcpy(return_val, pl->ob->name); |