
     Dark0n3's ZipScript-C - the most advanced public zipscript ever!
                http://kotisivu.raketti.net/darkone/

--------------------------------------------------------------------------------
 INDEX 
--------------------------------------------------------------------------------

 1. General Info

 1-1 License
 1-2 Program info
 1-3 Technical info
 1-4 Developer 'team'
 1-5 Hail

 2. Installation

 2-1 Configuration
 2-2 Compiling with gcc
 2-3 Using with glftpd

 3. Other stuff

 3-1 Contact info
 3-2 Bug reports & requests
 3-3 Join the team!
 

--------------------------------------------------------------------------------
 1-1 License crap
--------------------------------------------------------------------------------
 Author of this program is not responsible for any data loss, hardware problems,
physcial / mental injuries etc... so that means that I dont take responsibilty
of anything these scripts or my presense causes. Script is only to be available
on author's homepage - mirroring without permission is illegal. Modifications to
the source code are allowed for own purposes, commerical use of script is 
prohibited. Generally: edit it as much as you want, but do not distribute
modified versions nor sell them.


--------------------------------------------------------------------------------
 1-2 Program info
--------------------------------------------------------------------------------
 What's a "zipscript"?  - Zipscript is a program that runs series of tests on
target file & produces information about directory completeness/user avg speeds
from scratch. Using a ZipScript doesnt mean that you're running site with
illegal content - it works as well for legal releases.
 The main purpose of zipscript is to test file for possible errors, everything 
else is additional and depends highly on site's purpose. This script was planned
in mind that speed is life, slow zipscript will drain cputime which will often
slow other processess and in a world where 100mbit connection is common we
cannot sacrifice more than few milliseconds for such checks. If we go over that, 
it shows to user as lower transfer speeds. 
  !!! Faster script = lower loads + better transfer speeds.
 This script is optimized for speed and memusage, but still it has the most 
functions and userfriendly config file. And almost all requested functions will
be implemented within few days delay.


--------------------------------------------------------------------------------
 1-3 Technical info
--------------------------------------------------------------------------------

Announce:
 - ZIP: update    - after first file has been uploaded
        race      - for each new racer
        newleader - user claims the pole position
        complete  - after release has been compelted
        stats     - optional, can be shown on seperate line(s) or in complete
 - MP3: update    - after first file has been uploaded
        race      - for each new racer
        newleader - user claims the pole position
        halfway   - 50% of release has been uploaded 
        complete  - release has been completed
        stats     - optional, can be shown on seperate line(s) or in complete
 - RAR: update    - after sfv file has been uploaded
        firstfile - after first file has been uploaded
        race      - for each new racer
        newleader - user claims the pole position
        halfway   - 50% of release has been uploaded 
        complete  - release has been completed
        stats     - optional, can be shown on seperate line(s) or in complete

Symbolic Links:
 - ZIP: group     - sorted by group
 - RAR: group     - sorted by group
 - MP3: group     - sorted by group
        genre     - sorted by genre
        artist    - sorted by artists
        year      - sorted by years

MP3 Only:
 - Genre bans
 - Allowed rates
 - Allowed years

ZIP Only:
 - Include file(s) in zip

Special:
 - If diskcount wasnt found from diz, release completes after first
   disk and stats will be updated after every upload.
 - Keeps directory stats up to date after file deletion


--------------------------------------------------------------------------------
 1-4 Developer team
--------------------------------------------------------------------------------
 Coders:
  dark0n3
  chankster

 WWW Design:
  -
  
 Assistants (new ideas & bug reports):
  Sicko
  Tricky
  sunbird
  #project-zs
  ... several other peeps


--------------------------------------------------------------------------------
 1-5 Hail!
--------------------------------------------------------------------------------
 Tnx for everyone who have assisted me in my crusade to take over the world :-)
 Esp:
  kali (bitched me to add functions into one of my zipscripts)
  violator (whose tha man)
  hardwere (there's no d1 without you bro)
  freeman (I started scripting, 'cause i wanted to do better zs than his was)
  huRLum (tnx for bsd shell, will keep it bsd compatible for now on)
  opers on #glftpd
  also thanks to Klingon who would sell his own mother to be in this ty note
  those guys who still give support for the scene WITHOUT payment
  ... and all those ppl that I forgot to mention


--------------------------------------------------------------------------------
 2-1 Configuration
--------------------------------------------------------------------------------
 Configuring script is easy as count to three.
 1. Open COOKIES and zsconfig.h with your default editor
 2. Study default settings for a while
 3. Start editing :-)
 !!! You need to recompile EVERYTHING everytime you alter settings


--------------------------------------------------------------------------------
 2-2 Compiling with gcc
--------------------------------------------------------------------------------
 Run "make all" and hope that nothing fails.


--------------------------------------------------------------------------------
 2-3 Using with glftpd
--------------------------------------------------------------------------------

Add to glftpd.conf:
 calc_crc	*.[rR][aA][rR] *.[mM][pP]3 *.[rR0-9][0-9][0-9]
 post_check	/bin/zipscript-c *
 pre_check 	/bin/precheck.sh
 cscript	DELE  post /bin/postdel
 site_cmd	CLEAN EXEC /bin/cleaner.sh
Copy binaries to /glftpd/bin:
 zipscript-c
 postdel
 cleanup
 racestats
 datacleaner (for file-mode)
 sqlcleaner  (for mysql-mode)
 precheck.sh (located in scripts subdir)
 cleaner.sh  (located in scripts subdir)

- To take advantage of zipscript's suid function, you need to do 'chmod +s' on 
postdel and zipscript-c.
- Put cleanup and data/sqlcleaner to root crontab.
- Give zipscript write permission on glftpd.log ('chmod 777 glftpd.log')
- In file-mode create zipdatadir (default = .../ftp-data/zipscript/) and give
zipscript full privilidges in it.
- In mysql-mode create user and pass and database for the zipscript and give
zipscript's user full privilidges.


--------------------------------------------------------------------------------
 3-1 Contact info
--------------------------------------------------------------------------------
 Author (dark0n3):
   EMAIL: d@stoke.sillanpaa.jyu.fi
   IRC  : dark0n3 on EFnet @ #project-zs
   ICQ  : <private>


--------------------------------------------------------------------------------
 3-2 Bug reports & requests
--------------------------------------------------------------------------------
 If you notice a bug in the script, you should let me know asap! But before
contacting me, make sure that error occurs also with default script (if you have
done modifications) When you do the report, attach list of files in directory
(list -la) lines from glftpd.log (for that release) & .race & sfvfile from 
zipdatadirectory! Remember to tell if release is multicd rel, etc.. I cannot 
fix it, if you just tell me that script doesnt work!
 When sending request for a new function use your brain. I will not add anything
that would slow the script down. New fresh ideas are always welcome, and will be
implemented in a day or two.


--------------------------------------------------------------------------------
 3-3 Join the team
--------------------------------------------------------------------------------
 Team consists currently of one coder. And I really am a beginner with c, so I'd
have use for those who have coded for years (optimizing script further) also
more beta testers are needed. 
 Webdesigner, time to get a page that tells ppl who is the best ;] 
