Skip to content

ZarTek-Creole/tur-request-1

 
 

Repository files navigation

#---------------------------------------------------------------#
#                                                               #
# Tur-Requests.                                                 #
#                                                               #
# Supposed to replace 'site request' & 'site reqfilled' on site #
# and add !request, !reqfilled & !requests functions to irc.    #
# ( !reqdel and !reqwipe too )                                  #
#                                                               #
# Can also delete requests if they are older then a # of days   #
# and unfilled, as well as deleting those that ARE filled after #
# a (different?) number of days.                                #
#                                                               #
# Bot parts ment for Dark0n3's zipscript-c and/or pzs-ng.       #
#                                                               #
# Will create a .requests file (definable) and optionally the   #
# directories (REQ-Release and FILLED-Release).                 #
#                                                               #
# You can also use the built-in reward system to reward the     #
# uploaders of the request.                                     #
#                                                               #
#-[ Installation ]----------------------------------------------#
#                                                               #
# Copy tur-request.sh to /glftpd/bin. Make it executable (755). #
# Copy tur-request.conf to /glftpd/bin (same dir as .sh).       #
#                                                               #
# Copy either tur-request.no_auth.tcl OR tur-request.auth.tcl   #
# to your bots scripts dir and load it in the bots config file. #
# Which one you choose depends on weither or not you want to    #
# use the authentication system in tur-request.                 #
# See the AUTH_SYSTEM setting in tur-request.conf for more info.#
# Edit your selected tcl and change any triggers if you dont    #
# like the default settings. Take note of my mad tcl skillz =)  #
#                                                               #
# If you use linux, copy file_date to your glftpd's bin dir.    #
# Otherwise, the source is included as well. This is ONLY for   #
# deleting old filled requests automatically. If you do not     #
# want to use this, set 'removefdays' to "" in the config.      #
# To compile the source: gcc -o file_date file_date.c           #
#                                                               #
# Some of the binaries you need in /glftpd/bin are:             #
# basename, egrep, rmdir, cat, grep, touch, file_date, tr and   #
# some standard ones...                                         #
# If you are going to use the reward system, you need tuls as   #
# well. Thats a seperate package available at www.grandis.nu    #
#                                                               #
# Edit tur-request.conf and change the settings.                #
# Make REAL sure to read the explanations in the config. I dont #
# take any responsibility for it deleting stuff.                #
#                                                               #
#-[ glftpd.conf settings ]--------------------------------------#
#                                                               #
# Add this to glftpd.conf to replace the request and reqfilled  #
# commands. Im just gonna go ahead and presume you know what    #
# what 1 and * means in the custom-* stuff.                     #
#--                                                           --#
# site_cmd request       EXEC    /bin/tur-request.sh request
# site_cmd reqfilled     EXEC    /bin/tur-request.sh reqfilled
# site_cmd requests      EXEC    /bin/tur-request.sh status
# site_cmd reqdel        EXEC    /bin/tur-request.sh reqdel
# site_cmd reqwipe       EXEC    /bin/tur-request.sh reqwipe
#
# custom-request         1
# custom-reqfilled       *
# custom-requests        *
# custom-reqdel          *
# custom-reqwipe         1
#--                                                           --#
#                                                               #
#-[ zipscript-c / pzs-ng settings ]-----------------------------#
#                                                               #
# To make this mofo announce, We need to add some things.       #
# If you are using the old dark0n3s zipscript, the following    #
# goes to dZSbot.tcl.                                           #
# If you are using pzs-ng, it goes into dZSconf.tcl             #
# Note: If you are using a newer version of pzs-ng, you do not  #
#       need to do anything. TURGEN is already in the new       #
#       versions. Forgot exact build, but its in 1.0.1811 for   #
#       sure. Skip these instructions if so.                    #
#                                                               #
# Note: Depending on version, set msgtypes(DEFAULT) might not   #
#       exist in dZSconf.tcl. If so, find it in                 #
#       dZSbconf.defaults.tcl, copy it into dZSconf.tcl and     #
#       then add TURGEN to set msgtypes(DEFAULT) in dZSconf.tcl #
#                                                               #
# Check first that TURGEN is not already added. Its used for a  #
# few other scripts as well.                                    #
#                                                               #
# To 'set msgtypes(DEFAULT)', add TURGEN                        #
#                                                               #
# Add the following in the appropriate places:                  #
#--                                                           --#
# set chanlist(TURGEN) "#YourChan"
#
# set disable(TURGEN) 0
#
# set variables(TURGEN) "%msg"
#
# If you are using Dark0n3s dZSbot.tcl, this goes to dZSbot.tcl 
# as well:                                                      
# set announce(TURGEN)  "%msg"
#
# If, however, you are using pzs-ng (beta3 or higher), then
# this goes to your current theme file:
# announce.TURGEN = "%msg"
#                                                             --#
#-[ SS5 settings ]----------------------------------------------#
#                                                               #
# To make it announce when using SiteStat5, simply replace      #
# TURGEN: with RAW: in all occurances of the .conf and the .sh  #
# Nothing more should be required.                              #
#                                                               #
#-[ Other Instructions (READ THESE) ]---------------------------#
#                                                               #
# To automatically display current requests when a user goes    #
# into your requests dir, edit glftpd.conf and put .requests    #
# in the show_diz field. Example:                               #
# show_diz file_id.diz .message .imdb .requests                 #
#                                                               #
#-                                                             -#
#                                                               #
# If you want to hide the .requests file so that users can not  #
# edit or destroy it, edit glftpd.conf and put .requests on the #
# hidden_files field. Example:                                  #
# hidden_files .journal lost+found requests                     #
# Yes, it will still be displayed when entering the dir and     #
# users CAN still modify it, just not see it. Helps a bit.      #
# This is REALLY important to do incase you have the reward     #
# system enabled as it will be real easy to manually add a      #
# reward to the request otherwise.                              #
#                                                               #
#-                                                             -#
#                                                               #
# If you want to force users to use this script and NOT create  #
# dirs directly in the requests dir, add this to glftpd.conf:   #
# makedir /site/REQUESTS/*/ 1                                   #
# Change the path to suit your setup of course.                 #
#                                                               #
#-                                                             -#
#                                                               #
# The commands are request, reqfilled, status, reqwipe, reqdel, #
# fix and checkold.                                             #
#                                                               #
# reqdel is used to delete your own requests. It will check if  #
# the username thats trying to reqdel is the same as the one    #
# doing the request.                                            #
#                                                               #
# Siteops should instead use 'reqwipe' to delete other peoples  #
# requests.                                                     #
# This is needed because you can not reqfill an empty request   #
# and you might want to remove your request.                    #
#                                                               #
#-                                                             -#
#                                                               #
# If you run 'tur-request.sh status auto' it will check if      #
# there are any requests and if so, announce it to the channel. #
# If there are no requests, it will just quit. This is if you   #
# want a reminder in irc on all the requests from time to time. #
# You can just crontab it to do 'status auto' whenever you like.#
# So add this to crontab to announce all requests at 18:01.     #
# 1 18 * * *      /glftpd/bin/tur-request.sh status auto        #
#                                                               #
#-                                                             -#
#                                                               #
# If you want it to automatically delete old requests, crontab  #
# the 'checkold' command whenever you like.                     #
# It will delete both unfilled requests and filled ones,        #
# depending on how you configure the .conf file.                #
# 1 0 * * *      /glftpd/bin/tur-request.sh checkold            #
#                                                               #
#-                                                             -#
#                                                               #
# When requesting, you can specify who the request is for.      #
# Simple add -for:username to the request and this will show in #
# the list when checking requests. Examples:                    #
# site request -for:turranius More.Money.BP                     #
# or from irc:                                                  #
# !request -for:turranius More.Money.BP                         #
#                                                               #
#-                                                             -#
#                                                               #
# When requesting, you can add a reward for the filling of the  #
# request, if the rewardsystem is active. Use -reward:<mb>      #
# anywhere in the command.                                      #
# This only works if AUTH_SYSTEM=TRUE and you are using the     #
# tur-request.auth.tcl file.                                    #
#                                                               #
#-                                                             -#
#                                                               #
# If you do not want it announce in the main channel when doing #
# a request from glftpd, add -hide somewhere in the request.    #
# Example: site request -hide -for:turran Release.v1-GRP        #
# Neither -hide or -for: needs to be in that order though.      #
#                                                               #
# Reqwipe will WIPE OUT THE FOLDER too, even if its not empty.  #
# Used with 'site reqwipe' or '!reqwipe'. If the request has    #
# been filled, it wont wipe the dir.                            #
#                                                               #
#-                                                             -#
#                                                               #
# You can NOT run this script from shell. Its not designed that #
# way.                                                          #
#                                                               #
#-                                                             -#
#                                                               #
# There is also a argument called 'fix'. If you run that, it    #
# will re-sort the .requests file with the correct numbers.     #
# Ment if, for some reason, the numbers got screwed up          #
# ( tur-request.sh fix ).                                       #
#                                                               #
#-                                                             -#
#                                                               #
# I was going to make a complete script for zipscript-c that    #
# would automatically fill the request when it was completed    #
# but it wouldnt work very well. First of all, zipscript-c does #
# not return the full path, only filename. I can get around it  #
# by checking xferlog for where that file is. But what if a req #
# has 2 CD's ? When first was filled, it would reqfill the dir. #
# So, wont add that right now. You're free to make a working    #
# complete script as an addon for this and I'l gladly add it.   #
#                                                               #
#-                                                             -#
#                                                               #
# Although most of the text output are in the config for you to #
# change, some are not. Search in tur-request.sh if you want to #
# change some text that is not in the config.                   #
#                                                               #
#-[ Contact ]---------------------------------------------------#
#                                                               #
# http://www.grandis.nu/glftpd                                  #
#                                                               #
#---------------------------------------------------------------#

Releases

No releases published

Packages

No packages published

Languages

  • Shell 87.2%
  • Tcl 12.1%
  • C 0.7%