I'm doing something really stupid here:
But I can't tell what. This is suppose to be a who list.
The output is displayed totally wrong/corrupt.
void do_qwho( CHAR_DATA *ch, char *argument )
{
DESCRIPTOR_DATA *d;
CHAR_DATA *wch;
char buf[MAX_STRING_LENGTH];
char gender_color[MAX_STRING_LENGTH];
char clan_str[MAX_INPUT_LENGTH];
char council_str[MAX_INPUT_LENGTH];
set_char_color( AT_WHO, ch );
for ( d = first_descriptor; d; d = d->next )
{
if ( (d->connected == CON_PLAYING || d->connected == CON_EDITING )
&& ( wch = d->character ) != NULL && !IS_NPC(wch) && can_see( ch, wch ) )
{
if (wch != ch && IS_AFFECTED(wch, AFF_CLOAK) && (!ch || get_trust(ch) < LEVEL_GREATER ))
continue;
if ( wch->sex == 0 )
sprintf( gender_color, "&w" );
if ( wch->sex == 1 )
sprintf( gender_color, "&B" );
if ( wch->sex == 2 )
sprintf( gender_color, "&P" );
if ( IS_IMMORTAL(wch) )
sprintf( gender_color, "&Y" );
if ( wch->pcdata->clan )
{
strcpy( clan_str, " (" );
strcat( clan_str, wch->pcdata->clan->name );
strcat( clan_str, ")" );
}
if ( wch->pcdata->council )
{
strcpy( council_str, " [" );
strcat( council_str, wch->pcdata->council_name );
strcat( council_str, "]" );
}
sprintf(buf, "%s%-7s&D %s%s%s\n\r", gender_color,
IS_IMMORTAL(wch) ? "Admin" : race_table[wch->race]->race_name,
wch->name, clan_str, council_str );
send_to_char( buf, ch );
}
}
}But I can't tell what. This is suppose to be a who list.
The output is displayed totally wrong/corrupt.