do_who()

Posted by Typhon on Fri 18 Oct 2002 10:29 PM — 2 posts, 13,083 views.

USA #0
ok :p do_who() is annoying the crap out of me... is there a way to just make it so the the pc's online are just in the order in which they logged in and not split up into imms/deadly/etc. i know who is a rather lengthy function but i just dont seem to see where in the fucntion it starts arranging them by the imms/deadly/etc. stuff.. if i can just get rid of all that crap where it trys to arrange the characters by that.. im sure it would speed up the who function a bit.
#1
There sure is. You can even specify it to not show races and the such. Anyway, go into act_info.c and search for do who. Scroll down and look for the following then comment it out like I did.

/*
if ( first_deadly )
{
if ( !ch )
fprintf( whoout, "\n\r-------------------------------[ DEADLY CHARACTERS ]-------------------------\n\r\n\r" );
else
send_to_pager( "\n\r-------------------------------[ DEADLY CHARACTERS ]--------------------------\n\r\n\r", ch );
}

for ( cur_who = first_deadly; cur_who; cur_who = next_who )
{
if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
}

if (first_grouped)
{
/* if ( !ch )
fprintf( whoout, "\n\r-----------------------------[ GROUPED CHARACTERS ]---------------------------\n\r\n\r" );
else
send_to_pager( "\n\r-----------------------------[ GROUPED CHARACTERS ]---------------------------\n\r\n\r", ch );
}
for ( cur_who = first_grouped; cur_who; cur_who = next_who )
{
/* if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
}

if (first_groupwho)
{
if ( !ch )
fprintf( whoout, "\n\r-------------------------------[ WANTING GROUP ]------------------------------\n\r\n\r" );
else
send_to_pager( "\n\r-------------------------------[ WANTING GROUP ]------------------------------\n\r\n\r", ch );
}
for ( cur_who = first_groupwho; cur_who; cur_who = next_who )
{
if ( !ch )
fprintf( whoout, cur_who->text );
else
send_to_pager( cur_who->text, ch );
next_who = cur_who->next;
DISPOSE( cur_who->text );
DISPOSE( cur_who );
}

if ( first_imm )
{
if ( !ch )
fprintf( whoout, "\n\r-----------------------------------[ Akira is frustrated.. ]-----------------------------\n\r\n\r" );
else
send_to_pager( "\n\r-----------------------------------[ Akira is frustrated.. ]------------------------------\n\r\n\r", ch );
}
*/

If this doesn't help let me know and I'll explain it differently.

Sincerely,
Akira