Re: New & raw web based Dominion II game server
Stopping overwrite:
Its kludgy but I was just doing some quick thinking on it.
Set the game to not be auto-started. Set a cron to watch the game directory and copy each upload to a safety directory renamed from name.2h to name+number+login.2h and when the game starts then copy them back to the game directory in reverse order for hosting. That way Man2joe.2h will be overwriteen by Man1bob.2h just before hosting.
Offer the Users login an option to delete a file created by their login so that Bob can delete Man1bob.2h allowing Man2bob.2h to be used when the game is created.
Like I said, kludgy. But something like that. Hole the uploaded files somewhere until the game is first hosted then select the ones which should be used. Heck its Linux. There is probably a hundred ways of doing it. Some use of RCS or CVS commands (which Ive always avoided). Probably the easiest would be to go to a php script or using zope to make uploads go thru the web page so you can control its actions.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|