I embedded an sqlite database in my MUD, since my host doesn't provide me with a mysql process. I'm pretty impressed with it. The only advantage with using mysql would be the ability to interact with it from a website. Actually, I can interact with the sqlite database from our website, but that's a long discussion.
Anyway, database is a good option. Have you also considered doing it the lazy way? -bash-3.00$ time grep '^Mkill' ../player/* | grep -i '[EMAIL PROTECTED]' real 0m0.026s user 0m0.020s sys 0m0.013s 0.03 seconds to search a field from 500 pfiles... And I'm assuming your account files are shorter than my pfiles. --Palrich On 8/15/06, Ammaross Danan <[EMAIL PROTECTED]> wrote:
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
-- ROM mailing list [email protected] Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom

