Re: Can you do me a favor... heh... (fwd)

From: Kyle Goodwin (vbmasta@EARTHLINK.NET)
Date: 06/15/98


Heh nice addon to remove a linkdead char but you could just purge him/her.

Kyle Goodwin

----------
> From: George <greerga@CIRCLEMUD.ORG>
> To: CIRCLE@post.queensu.ca
> Subject:  Can you do me a favor...  heh... (fwd)
> Date: Monday, June 15, 1998 8:27 PM
>
> ---------- Forwarded message ----------
> Date: Mon, 15 Jun 1998 11:52:24 -0700
> From: Tony Robbins <tonyr@presys.com>
> To: greerga@circlemud.org
> Subject: Can you do me a favor...  heh...
>
> Hi, it's me, the guy that can't get back on the list...  I was wondering
if
> you could put this message out for me...  I'm not trying to use you as a
> post office, but I really want to distribute this.  Feel free to tell me
to
> go take a flying leap...
>
> (BEGIN MESSAGE - [CODE] PlayerLink Utility) ----
> This is a god command that will either load a linkdead player or remove a
> linkless character from the game.  I think I'm forgetting to free the
> character, but I'm not sure because of the extract_char(), and besides,
you
> can look at stuff yourself.
>
> This is based on code from Mark A. Heilpern which would only load
linkdead
> people.  I added the choice of removing them also.  I didn't think there
> was another way to get rid of linkdead people.  Anyway, give credit to
Mark
> Heilpern and I (Tony Robbins) if you use this, or else you're a bad
person.
>
> You need to prototype void read_aliases(struct char_data *ch); if you
have
> alias saving on your MUD.
>
> Do the interpreter.c stuff on your own...  :)
>
> ACMD(do_playerlink)
> {
>   struct char_data *victim = 0;
>   struct char_file_u tmp_store;
>   char *action = arg, *vict = buf2;
>
>   two_arguments(argument, action, vict);
>
>   if (!*action || !*vict) {
>     send_to_char("Usage: playerlink [ load | remove ] <player>\r\n", ch);
>     return;
>   }
>   if (is_abbrev(action, "load")) {
>     if (get_player_vis(ch, vict, 0)) {
>       send_to_char("That player is already connected/loaded!\r\n", ch);
>       return;
>     }
>     CREATE(victim, struct char_data, 1);
>     clear_char(victim);
>     if (load_char(vict, &tmp_store) > -1) {
>       store_to_char(&tmp_store, victim);
>       if (GET_LEVEL(victim) <= GET_LEVEL(ch)) {
>         Crash_load(victim);
>         victim->next = character_list;
>         character_list = victim;
>         victim->desc = NULL;
>         char_to_room(victim, ch->in_room);
>         act("You gesture and a statue of $N forms from nothingness.",
> FALSE, ch, 0, victim, TO_CHAR);
>         act("$n gestures and a statue of $N appears from nowhere.",
FALSE,
> ch, 0, victim, TO_NOTVICT);
>         read_aliases(victim);   /* remove this if you don't have alias
> saving! */
>         sprintf(buf, "(GC) %s has linkloaded %s.", GET_NAME(ch),
> GET_NAME(victim));
>         mudlog(buf, BRF, MAX(LVL_IMPL, GET_INVIS_LEV(ch)), TRUE);
>       } else {
>         send_to_char("Sorry, you aren't high enough level to linkload
that
> char.\r\n", ch);
>         free_char(victim);
>       }
>     } else {
>       send_to_char("No such player.\r\n", ch);
>       free(victim);
>     }
>   } else if (is_abbrev(action, "remove")) {
>     if (!(victim = get_player_vis(ch, vict, 0))) {
>       send_to_char("That player isn't in the game right now.\r\n", ch);
>       return;
>     } else if (victim->desc) {
>       send_to_char("That player isn't linkdead.\r\n", ch);
>       return;
>     }
>     act("You gesture and $N dissolves into nothingness.", FALSE, ch, 0,
> victim, TO_CHAR);
>     act("$n gestures and $N dissolves into nothingness.", FALSE, ch, 0,
> victim, TO_NOTVICT);
>     sprintf(buf, "(GC) %s has unloaded %s.", GET_NAME(ch),
GET_NAME(victim));
>     Crash_rentsave(victim, 0);
>     extract_char(victim);
>     mudlog(buf, BRF, MAX(LVL_IMPL, GET_INVIS_LEV(ch)), TRUE);
>   }
>   return;
> }
>
>
> Sorry if this is truncated by the mailer...  Wish I could distribute it
> first-hand...  :P
>
> -B.
>
>
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
>      +------------------------------------------------------------+


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