[NEWBIE] [CODE] Help making PC no say

From: Dave Willard (dwillard@iquest.net)
Date: 04/18/01


My mud people wanted me to imp a deviant flag for abusive players. I put
the flag in and it works for do_gen_comm routine later to block gossip
and shout. I added the lines that start with > to my code and still
people with deviant flags dont get a message and they can still say.
This is my first post so please dont flame me too bad as Im new to
circle and to C. (I do know VB, Basic, and some C.) I know the same code
is added 2 times...just different spots to see if it worked there.

ACMD(do_say)
{
  skip_spaces(&argument);

  if (!IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AFK)){
    send_to_char("You are still &RAFK&n!\r\n", ch);
    return;
}
>  if (!IS_NPC(ch) && PRF_FLAGGED(ch, PLR_DEVIANT)){
>    send_to_char("You have been found by a God to be rude and vulgar,
when you are excused you will be able to say again!\r\n", ch);
>    return;
>}
  if (!*argument)
    send_to_char("Yes, but WHAT do you want to say?\r\n", ch);
>  else if (!IS_NPC(ch) && PRF_FLAGGED(ch, PLR_DEVIANT)) {
>    send_to_char("You have been found by a God to be rude and vulgar,
when you are excused you will be able to say again!\r\n", ch);
>    return;
>  } else {
    sprintf(buf, "$n says, '%s&n'", argument);
    act(buf, FALSE, ch, 0, 0, TO_ROOM|DG_NO_TRIG);

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

Dave Willard

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/05/01 PST