QUICK SIDE NOTE:
Each section of code that is calling for log_printf, such as act_comm.c - do_reply, doesn't even have a call for log_printf.
Code for do_reply:
void do_reply( CHAR_DATA *ch, char *argument )
{
char buf[MAX_STRING_LENGTH];
CHAR_DATA *victim;
int position;
#ifndef SCRAMBLE
int speaking = -1, lang;
for ( lang = 0; lang_array[lang] != LANG_UNKNOWN; lang++ )
if ( ch->speaking & lang_array[lang] )
{
speaking = lang;
break;
}
#endif
xREMOVE_BIT( ch->deaf, CHANNEL_TELLS );
if ( IS_SET( ch->in_room->room_flags, ROOM_SILENCE ) )
{
send_to_char( "You can't do that here.\n\r", ch );
return;
}
if ( !IS_NPC(ch) && xIS_SET(ch->act, PLR_SILENCE) )
{
send_to_char( "Your message didn't get through.\n\r", ch );
return;
}
if ( ( victim = ch->reply ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if ( !IS_NPC( victim ) && ( victim->switched )
&& can_see( ch, victim ) && ( get_trust( ch ) > LEVEL_HERO ) )
{
send_to_char( "That player is switched.\n\r", ch );
return;
}
else if ( !IS_NPC( victim ) && ( !victim->desc ) )
{
send_to_char( "That player is link-dead.\n\r", ch );
return;
}
if ( !IS_NPC(victim) && xIS_SET(victim->act, PLR_AFK) )
{
send_to_char( "That player is afk.\n\r", ch );
return;
}
if ( xIS_SET( victim->deaf, CHANNEL_TELLS )
&& ( !IS_IMMORTAL( ch ) || ( get_trust( ch ) < get_trust( victim ) ) ) )
{
act( AT_PLAIN, "$E has $S tells turned off.", ch, NULL, victim,
TO_CHAR );
return;
}
if ( ( !IS_IMMORTAL(ch) && !IS_AWAKE(victim) )
|| ( !IS_NPC(victim) && IS_SET( victim->in_room->room_flags, ROOM_SILENCE ) ) )
{
act( AT_PLAIN, "$E can't hear you.", ch, 0, victim, TO_CHAR );
return;
}
if ( victim->desc /* make sure desc exists first -Thoric */
&& victim->desc->connected == CON_EDITING
&& get_trust(ch) < LEVEL_BUILDER )
{
act( AT_PLAIN, "$E is currently in a writing buffer. Please try again in a few minutes.", ch, 0, victim, TO_CHAR );
return;
}
/* Check to see if the receiver is ignoring the sender */
if(is_ignoring(victim, ch))
{
/* If the sender is an imm they cannot be ignored */
if(!IS_IMMORTAL(ch) || get_trust(victim) > get_trust(ch))
{
set_char_color(AT_IGNORE, ch);
ch_printf(ch,"%s is ignoring you.\n\r",
victim->name);
return;
}
else
{
set_char_color(AT_IGNORE, victim);
ch_printf(victim, "You attempt to ignore %s, but "
"are unable to do so.\n\r", ch->name);
}
}
act( AT_TELL, "You tell $N '$t'", ch, argument, victim, TO_CHAR );
position = victim->position;
victim->position = POS_STANDING;
#ifndef SCRAMBLE
if ( speaking != -1 && (!IS_NPC(ch) || ch->speaking) )
{
int speakswell = UMIN(knows_language(victim, ch->speaking, ch),
knows_language(ch, ch->speaking, victim));
if ( speakswell < 85 )
act( AT_TELL, "$n tells you '$t'", ch, translate(speakswell, argument, lang_names[speaking]), victim, TO_VICT );
else
act( AT_TELL, "$n tells you '$t'", ch, argument, victim, TO_VICT );
}
else
act( AT_TELL, "$n tells you '$t'", ch, argument, victim, TO_VICT );
#else
if ( knows_language( victim, ch->speaking, ch ) ||
(IS_NPC(ch) && !ch->speaking) )
act( AT_TELL, "$n tells you '$t'", ch, argument, victim, TO_VICT );
else
act( AT_TELL, "$n tells you '$t'", ch, scramble(argument, ch->speaking), victim, TO_VICT );
#endif
victim->position = position;
victim->reply = ch;
ch->retell = victim;
if ( IS_SET( ch->in_room->room_flags, ROOM_LOGSPEECH ) )
{
sprintf( buf, "%s: %s (reply to) %s.",
IS_NPC( ch ) ? ch->short_descr : ch->name,
argument,
IS_NPC( victim ) ? victim->short_descr : victim->name );
append_to_file( LOG_FILE, buf );
}
if(!IS_NPC(victim) && IS_IMMORTAL(victim) && victim->pcdata->tell_history &&
isalpha(IS_NPC(ch) ? ch->short_descr[0] : ch->name[0]))
{
sprintf(buf, "%s told you '%s'\n\r",
capitalize(IS_NPC(ch) ? ch->short_descr : ch->name),
argument);
/* get lasttell index... assumes names begin with characters */
victim->pcdata->lt_index =
tolower(IS_NPC(ch) ? ch->short_descr[0] : ch->name[0]) - 'a';
/* get rid of old messages */
if(victim->pcdata->tell_history[victim->pcdata->lt_index])
STRFREE(victim->pcdata->tell_history[victim->pcdata->lt_index]);
/* store the new message */
victim->pcdata->tell_history[victim->pcdata->lt_index] =
STRALLOC(buf);
}
return;
}
Toy |