Re: Twink filter.

From: Brian Gray (mandy@tmarts.com)
Date: 03/14/96


On Thu, 14 Mar 1996, Ned Lovely wrote:

> Hello all!
> 
> Anticipating problems, I am setting up a twink filter for my mud that
> will require users to register with me before they are allowed access.
> 
> I'm going to mail them a random password to an email address that they
> provide, and I am only going to allow only one account per email
> address...
> 
> At any rate, what I want to know is: Can I tack a new user onto the
> /lib/etc/players file without Circle puking? Will I need to implement
> semaphore locking on the players file? (ewww)

  I have no idea what semaphore locking is, but what you describe sounds 
like something I did in an afternoon.  It's not very difficult, and it 
has its pros and cons.  Mainly, it allows you as implementor to ban 
selective email addresses instead of more general measures against a 
site, and it also allows you to have the code police multiplaying rather 
than having the administration do it.  On the other hand, some people 
will not play your game because they don't want to register, and more 
importantly, people can't play your game who don't have an e-mail 
address.  I figured it was worth it, and here's my implementation:

  When a player logs on the first time, he creates a character without 
being prompted for a password.  When the character is ready to be saved 
to the pfile, he is prompted for his email address or to (a)ttach to 
another player.  If he enters an email address it does some error 
checking (must have a '@', must not be root, must return non-zero from 
getHostByName()) before saving the player with the email string and 
kicking him off the MUD.  It then mails him his initial password just as 
you described.  I just generated a random short int with the standard 
random() call and used the resulting (usually) 5-digit number as the 
password.

  Instead of an email address, a player has the option of typing 'a' to 
attach to another player.  It prompts him for the other player's 
password, and if correct copies the email address over, saves, and places 
him at the main menu.

  As my game is not open yet, we haven't decided on a multiplaying policy 
yet, or what we think of storage characters etc., but we feel this method 
is flexible enough to handle whatever policies we eventually implement.  
If you'd like the code, mail me and you're free to have it.  No sense in 
reinventing the wheel, and if you find bugs that'll help me too  :)

 -- Mandy, Director of The Multiplex
    pccs.cs.pomona.edu 4747
    http://www.tmarts.com/Multiplex



This archive was generated by hypermail 2b30 : 12/07/00 PST