Inline Color Questions

From: Mathew Earle Reuther (graymere@zipcon.net)
Date: 08/01/02


I'm currently using inline color courtesy of dak's prompt code, which
means that all my color commands are &x (x is a letter or a number).  Now
the trouble I need to overcome is this: I've got to figure out a way to
limit player access to color.  Mostly what I need to do is stop color
bleed!  How can I make it so that player input is followed with a check to
return color to normal?  (For example anyone shouting in red and not
resetting the color to white will screw up people's text.  Same with say.)

Example code from do_say:

ACMD(do_say)
{
  skip_spaces(&argument);

  if (!*argument)
    send_to_char(ch, "Yes, but WHAT do you want to say?\r\n");
  else {
    char buf[MAX_INPUT_LENGTH + 12];

    snprintf(buf, sizeof(buf), "$n says, '%s'", argument);
    act(buf, FALSE, ch, 0, 0, TO_ROOM | DG_NO_TRIG);

    if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_NOREPEAT))
      send_to_char(ch, "%s", OK);
    else {
      delete_doubledollar(argument);
      send_to_char(ch, "You say, '%s'\r\n", argument);
    }
  }
  /* trigger check */
  speech_mtrigger(ch, argument);
  speech_wtrigger(ch, argument);
}

As you can see here, where it is dropping argument there needs to be some
sort of a check to reset the color to normal.

    snprintf(buf, sizeof(buf), "$n says, '%s'", argument);
    act(buf, FALSE, ch, 0, 0, TO_ROOM | DG_NO_TRIG);

HOWEVER, since this goes to the room, I can't figure out how to do the
check.  (Let alone a check for SHOUT.)

Any thoughts?

-Mathew

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT