[CODE] do_say #2

From: Benjamin Draper (satrycus@DRACHENBURG.DEMON.CO.UK)
Date: 04/05/98


Okay, thanks to Daniel Koepke this is a better version of what I took
from Archipelago.


ACMD(do_say)
{
  skip_spaces(&argument);

  if (!*argument)
    send_to_char("Yes, but WHAT do you want to say?\r\n", ch);
  else {
       switch (*(argument+strlen(argument)-1)) {
       case '?':
           sprintf(buf1, "ask");
           break;
       case '!':
           sprintf(buf1, "exclaim");
           break;
       default:
           sprintf(buf1, "say");
           break;
       }
    sprintf(buf, "$n %ss, '%s'", buf1, argument);
    act(buf, FALSE, ch, 0, 0, TO_ROOM);
    if (PRF_FLAGGED(ch, PRF_NOREPEAT))
      send_to_char(OK, ch);
    else {
      sprintf(buf, "You %s, '%s'", buf1, argument);
      act(buf, FALSE, ch, 0, argument, TO_CHAR);
    }
  }
}

Sorry for the obvious mistake.

-> Ben


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST