24 Oct, 2011, arholly wrote in the 1st comment:
Votes: 0
Hello.
So, I discovered another problem. It seems that if you go to log a player, it boots you from the game. I added a check to see if it was even setting the LOG plr_flag, and it's not getting that far. I'm guessing it is a problem earlier than that because if I do log all, it also kicks me out. Also, if I just type log, it is kicking me out, so I'm guessing the whole command is messed up.

Also, for clarification, it is not shutting down the mud, it is treating the player as if they typed the quit command, meaning it is displaying in the logs as if they logged out. Now, the interp.c file is showing "log" pointing to "do_log", so it is apparently pointing to the right place.

What is going on and can someone explain it to me?

void do_log( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
CHAR_DATA *victim;

one_argument( argument, arg );

if ( arg[0] == '\0' )
{
send_to_char( "Log whom?\n\r", ch );
return;
}

if ( !str_cmp( arg, "all" ) )
{
if ( fLogAll )
{
fLogAll = FALSE;
send_to_char( "Log ALL off.\n\r", ch );
}
else
{
fLogAll = TRUE;
send_to_char( "Log ALL on.\n\r", ch );
}
return;
}

if ( ( victim = get_char_world( ch, arg ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}

if ( IS_NPC(victim) )
{
send_to_char( "Not on NPC's.\n\r", ch );
return;
}

/*
* No level check, gods can log anyone.
*/
if ( IS_SET(victim->plr_flags, PLR_LOG) )
{
REMOVE_BIT(victim->plr_flags, PLR_LOG);
sprintf( log_buf, "%s has had their LOG flag removed.", ch->name );
log_string( log_buf );
send_to_char( "LOG removed.\n\r", ch );
}
else
{
SET_BIT(victim->plr_flags, PLR_LOG);
sprintf( log_buf, "%s has had their LOG flag set.", ch->name );
log_string( log_buf );
send_to_char( "LOG set.\n\r", ch );
}

return;
}

Thanks again,
Arholly
24 Oct, 2011, Vatiken wrote in the 2nd comment:
Votes: 0
The command looks fine, my guess would be that the interpreter is hi-jacking the "log" command and sending it elsewhere.
24 Oct, 2011, arholly wrote in the 3rd comment:
Votes: 0
<smacks his head> Yes, that was it. Thanks. Redid it so it goes in a better order. Ugh.
0.0/3