Re: [NEWBIE] Can't Delete an account/character

From: Robert Moon (LegalWriter@msn.com)
Date: 06/10/00


----- Original Message -----
From: Jons <trilist@HOTMAIL.COM>
> I had created a second mortal character to play around. Now I want to
delete
> it. So from the menu I choose delete character and everything seem to work
> fine: I got disconnected and said character is deleted. When I reconnect,
I
> tried to use the deleted account. and surprisingly, its still there.
>
> Can this be somekind of mis-config of my mud?

Hmm...  When you delete your character in this manner, the following takes
place:

1.  interpreter.c (case CON_DELCNF2 in nanny())
     The player is flagged PLR_DELETED and save_char() is called.
2.  db.c
     save_char() begins executing and char_to_store() is called.
3.  db.c
     char_to_store() executes and control returns to save_char().
4.  db.c
     save_char() finishes executing by opening up the player file and
writing the new flag setting to disk based on the data passed to it from
char_to_store.  Control returns to interpreter.c.
5.  interpreter.c
     Player's rent file (the objects he's wearing and holding) is deleted
through a series of function calls that have no bearing on the PLR flag
status of the character.

As you may have figured out, the only real thing that was deleted was the
object file for the character.  He still exists in his entirety in the
player file.  When you try to create a new character with an old character's
name, the game simply overwrites the character in the same position in the
character file as the old one resided.  Specifically, the following takes
place:

1.  interpreter.c
     The state of GET_NAME is reached in nanny().
2.  interpreter.c
     Various checks are made to make sure the inputted name isn't reserved,
profanity, a fill word, etc.
3.  If the name is found, we load up the character and then check to see if
he has the PLR_DELETED flag.
4.  If the player is flagged as having been deleted, we erase his data and
create an entirely new entry in the same position in the player file and
then move on as if the player had created a new character that wasn't the
same name as a previously deleted one.

**** Where your problem may lie: ****
There are several places where you may have a problem.  First, the functions
that are responsible for flagging the player as PLR_DELETED may not be doing
so.  Second, the save_char() function may not be saving the character to
file, and thus his PLR_DELETED flag goes byebye when he is disconnected
after "deleting".  Third, when someone logs in and tries to use the name of
a properly deleted character, the check to see if he has the PLR_DELETED
flag may have been removed.  I suggest going through each called function
with a fine-toothed comb to see which area is failing.

One sure way to narrow down your search is to throw some things into his
inventory, delete him, and recreate.  If he *still* has the objects, then
you know that Crash_delete_file(GET_NAME(d->character)) was never called in
"case CON_DELCNF2:" of nanny().  This may be the result of you fiddling
around with this area of code, and accidentally bypassing this funcation
call and hence the line that flags him as deleted,
SET_BIT(PLR_FLAGS(d->character), PLR_DELETED);, by an improperly placed
"break" or close brace }.

Good luck and happy hunting.

--Rob.


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT