Re: Questions about FORK.
"Valnir" <[email protected]> Wed, 16 Aug 2006 11:40:38 -0400
| Newsgroups | gmane.games.devel.mud.rom |
|---|---|
| Message-ID | <[email protected]> |
You know.. while this may be the lazy way, it's actually the most effective for what I want to do. Thanks for the idea. It works perfectly and very quickly. :) - Valnir ----- Original Message ----- From: "Michael Barton" <[email protected]> To: "Ammaross Danan" <[email protected]> Cc: <[email protected]> Sent: Tuesday, August 15, 2006 7:11 PM Subject: Re: Questions about FORK. >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 > -- ROM mailing list [email protected] Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom