[CF-Devel] Player files download Web interface
crossfire-devel-admin at archives.real-time.com
crossfire-devel-admin at archives.real-time.com
Sun Sep 14 02:46:51 CDT 2003
Yann Chachkoff wrote:
>
Philip Stolarczyk (Known as 'Somebdy') asked me to submit his work on the
>
mailing list, as he currently cannot do it himself.
>
>
His description of the thing:
>
>
"This CGI script allows players to download their players files through a web
>
interface. It does password checking and has some extra options."
>
>
URL of the Perl Script:
http://www.theperlguru.com/crossfire/pldl.pl.txt
>
>
Comments (and possibly bug reports - if any) appreciated.
>
Took a look. Nice bit of code.
Few comments/questions:
Is there a html page out there that uses this, just to toss in as a sample?
I plan on putting this in the utils directory in the server code. That way
autoconf can be used to fill in some of the fields so it just works with few
changes.
I note that there is a single file, stored in /tmp, that is used to track when
players last downloaded. My personal thought is that it would be easier to just
create/touch a file in the player directory, and one could just use the last
modified time on that file. This does mean an extra file/inode used up in the
filesystem, but I don't think that is that big a deal, and would seem to
simplify the code.
Related to this, it would be very easy for the server to create some other
file to denote that the player is actually playing the game, and remove it when
the player logs off. Thus, the script could check for the existance of that
file, and if it finds it, note some error.
Now there could be stale data in this case if the server crash. But I just
envision the server creating that file unconditionally, so it wouldn't care. It
would just mean that you could get cases where you can't download the character
after hte server crashed (if you were playing at that time) until you logged in
and logged out.
the other thing I'd do is change the output of the tar to just dump the data
directly down the the connection instead of writing it to a tmp file first.
That seems like it'd be more efficiently. Also, potentially having a whole
bunch of tar files in /tmp doesn't seem like a generally good idea.
_______________________________________________
crossfire-devel mailing list
crossfire-devel at lists.real-time.com
https://mailman.real-time.com/mailman/listinfo/crossfire-devel
More information about the crossfire
mailing list