Re: Questions about FORK.

Ammaross Danan <[email protected]> Tue, 15 Aug 2006 16:45:41 -0600
Newsgroups gmane.games.devel.mud.rom
Message-ID <[email protected]>
I like Mark's suggestion (repeated below) of having accounts sorted by 
email address. It does, however, remove the 'RP' of logging in using a 
name (weak argument I know). Personally, my biggest problem would be if 
the email address was [email protected]. Pain 
to type.

One more alternative though is that your accounts could be stored in a 
MySQL database. Then a "SELECT id FROM accounts WHERE email = '%s' LIMIT 
1" would pull the first account found with the email (no sense pulling 
the whole list if by some hack of the admins there are more than one 
account with the same email...) so a mysql_num_rows() > 0 would tell you 
if their new or not. If the email field is indexed properly, should take 
all of 0.0085 seconds for 400 accounts (random figures, but you get the 
idea).

Ammaross Danan
Realms of the Forgotten
telnet://www.rotf.net:5000
http://www.rotf.net

Mark Roberts wrote:
> Honestly, the 2nd option is probably the cleanest and most efficient way to validate accounts my email address.
> 
> I would store all account information by email address either in a single account file or in a subdirectory containing all pfiles for that player.
> 
> Example:
> You have 5 players, bob, sue, john, ellen, and michael (all @example.com).  You might have such a directory structure as this:
> 
> ~/accts/[email protected]/bob.pfile
> 
> ~/accts/[email protected]/sue.pfile
> ~/accts/[email protected]/irtehleetkillar.pfile
> 
> ~/accts/[email protected]/john.pfile
> 
> ~/accts/[email protected]/ellen.pfile
> 
> ~/accts/[email protected]/michael.pfile
> ~/accts/[email protected]/korteliandree4431.pfile
> ~/accts/[email protected]/somesillynamethaticannotpronouncegivenadictionaryandacompass.pfile
> 
> Now, someone goes to log into your system.  They log in with the name [email protected] (or try to log in anyway)
> 
> We'll notice there is no accts/[email protected] directory.  So we immediately know that we have to create a new account.
> 
> Now, [email protected] decides to come play, and you immediately notice that there is a [email protected] directory.
> So you get a list of all the .pfile's in the directory and present them as character choices to play as.
> 
> Mark

-- 
ROM mailing list
[email protected]
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom