This little command will allow you to boot off all the linkdead people from the mud. I find
it annoying to log on and see people sitting around linkdead all the time so here you go.
Add to the end of act_wiz.c:
void do_unlink( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *linkdead;
CHAR_DATA *wch;
CHAR_DATA *wch_next;
bool found = FALSE;
int i = 0;
if ( argument[0] == '\0' )
{
send_to_char( "Unlink <all> or Unlink <player>\n\r", ch );
for ( wch = char_list; wch != NULL; wch = wch_next )
{
wch_next = wch->next;
if (IS_NPC( wch ) )
continue;
if ( wch->desc == NULL )
i++;
}
send_to_char( "\n\r{C================================================{x\n\r\n\r",ch );
printf_to_char( ch, "The number of linkdead people on the mud is %d.\n\r", i );
return;
}
if ( !str_cmp( argument, "all" ) )
{
for ( wch = char_list; wch != NULL; wch = wch_next )
{
wch_next = wch->next;
if ( IS_NPC( wch ) )
continue;
if ( wch->desc == NULL )
{
found = TRUE;
do_function( wch, &do_quit, "" );
}
}
if ( found )
send_to_char( "Extracting all linkdead players.\n\r", ch );
if ( !found )
send_to_char( "No linkdead players were found!\n\r", ch );
return;
}
if ((linkdead = get_char_world(ch,argument)) == NULL)
{
send_to_char("They aren't here.\n\r", ch);
return;
}
if ( linkdead->desc != NULL )
{
send_to_char( "They aren't linkdead just use disconnect instead.\n\r", ch );
return;
}
else
{
do_function( linkdead, &do_quit, "" );
send_to_char("They have been booted.\n\r", ch);
return;
}
}
Then just add the declarations into interp.c, and interp.h and you should be good to go.