AwakeMUD icon indicating copy to clipboard operation
AwakeMUD copied to clipboard

EXCLAIM does not respect language

Open luciensadi opened this issue 5 years ago • 1 comments

Describe the bug EXCLAIM does not use language at all.

Additional context

ACMD(do_exclaim)
{
  skip_spaces(&argument);

  if (!*argument)
    send_to_char(ch, "Yes, but WHAT do you like to exclaim?\r\n");
  else if (affected_by_spell(ch, SPELL_STEALTH) || world[ch->in_veh ? ch->in_veh->in_room : ch->in_room].silence[0])
    send_to_char("You can't seem to make any noise.\r\n", ch);
  else {
    sprintf(buf, "$z ^nexclaims, \"%s!^n\"", argument);
    if (ch->in_veh) {
      for (struct char_data *tmp = ch->in_veh->people; tmp; tmp = tmp->next_in_veh) {
        // Replicate act() in a way that lets us capture the message.
        if (can_send_act_to_target(ch, FALSE, NULL, NULL, tmp, TO_ROOM)) {
          // They're a valid target, so send the message with a raw perform_act() call.
          store_message_to_history(tmp->desc, COMM_CHANNEL_SAYS, str_dup(perform_act(buf, ch, NULL, NULL, tmp)));
        }
      }
    } else {
      for (struct char_data *tmp = world[ch->in_room].people; tmp; tmp = tmp->next) {
        // Replicate act() in a way that lets us capture the message.
        if (can_send_act_to_target(ch, FALSE, NULL, NULL, tmp, TO_ROOM)) {
          // They're a valid target, so send the message with a raw perform_act() call.
          store_message_to_history(tmp->desc, COMM_CHANNEL_SAYS, str_dup(perform_act(buf, ch, NULL, NULL, tmp)));
        }
      }
    }
    if (PRF_FLAGGED(ch, PRF_NOREPEAT))
      send_to_char(OK, ch);
    else {
      sprintf(buf, "You exclaim, \"%s!^n\"\r\n", argument);
      send_to_char(ch, buf);
      store_message_to_history(ch->desc, COMM_CHANNEL_SAYS, str_dup(buf));
    }
  }
}

luciensadi avatar Jun 12 '19 21:06 luciensadi

Same with ASK and WHISPER.

luciensadi avatar Jun 12 '19 21:06 luciensadi