Set Snoop

From: Stephen Wolfe (siv@CYBERENET.NET)
Date: 08/13/98


All this talk of snooping has reminded me of something that I added a
while ago..a 'set snoop' command that would allow an immortal to set a
mortal snooping another character (that the imm could snoop himself)..this
was useful if i had an immort idling on while playing with a mort..i'd set
the mort snooping the immort so that i'd know if other (invis) immorts
were trying to get my attention, or watch the mudlogs..anyway, here's the
code..

ACMD(do_set)
{
...
    { "nodelete", LVL_IMPL, PC, BINARY },
+   { "snooping", LVL_BUILDER, PC, MISC },
    { "\n", 0, BOTH, MISC }
...
  case 49:
  if (!*val_arg)
    stop_snooping(vict);
  else if (!(tch = get_char_vis(ch, val_arg)))
    send_to_char("No such person around to snoop.\r\n", ch);
  else if (!tch->desc)
    send_to_char("There's no link.. nothing to snoop.\r\n", ch);
  else if (vict == tch)
    stop_snooping(vict);
  else if (vict == ch)
    do_snoop(ch, val_arg, 0, 0);
  else if (tch->desc->snoop_by)
    send_to_char("Busy already. \r\n", ch);
  else if (tch->desc->snooping == vict->desc)
    send_to_char("Don't be stupid.\r\n", ch);
  else {
    if (tch->desc->original)
      tch = tch->desc->original;

    if ((GET_LEVEL(tch) >= GET_LEVEL(ch)) && (tch != ch)) {
      send_to_char("You can't.\r\n", ch);
      return;
    }

    if (vict->desc->snooping)
      vict->desc->snooping->snoop_by = NULL;

    vict->desc->snooping = tch->desc;
    tch->desc->snoop_by = vict->desc;
  }
    break;
...
} /* end of do_set */

enjoy..

siv


     +------------------------------------------------------------+
     | 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