Installing SDClone


Installing a language file for SDClone


Configuring SDClone

- Quick configuration for dummies:

$mainDir="/myshare";
Change it to point to directory where SDClone should find the files to share them
For example we want the script find files in directory /sharing, so we change it to $mainDir="/sharing";
Note: if you wish take files from multi-directories take a look at the FAQ.

$Trigger="dccserv";
It's our trigger, the special word users will use to query your server. The script will use that trigger first and also take your current irc nick as trigger. Say we want as trigger "Yeah". We put $Trigger="Yeah";

push @chans, "#bluehouse";
Here we define what channels will be able to get files. The channels where our trigger will answer if you prefer...
We want serve files in #mp3tunes and #mp3jukebox
We change the first to push @chans, "#mp3tunes";
And we create another one after that push @chans, "#mp3jukebox";
Note: this could be change while the script is working with /sdstartserve and /sdstopserve

$openBSD="false";
If you run OpenBSD, FreeBSD or NetBSD then you MUST set this to $openBSD="true";
If you run Linux, leave it like that.

That's all... OMG you've made it !!!


- Full configuration

$SDLang="gb";
This one set the default language the script will use to talk to channels and you in front of the computer running the script.
It's simply the country code to use, by default gb, so the script speak english.
The script can speak any languages you have add.
Note: this could be change while the script is working with /sdswitchlanguage

$SDUserLang="gb";
This one define the default language the script will use to talk to a unknown user. That user could change it later to another one...
English is of 'course again the best choice.

@chans=();
No need to change it ! Leave this alone, i just put that because i saw user that are trying to modify it.
Except people that have knowledge of Perl, nobody should use it.

$slotMin=1;
This is the default number of minimum slots the script should keep open. If you wish to have 3 slots always open just set this to $slotMin=3;
What is the better value for $slotMin ?
It highly depend on two factors : 1/ your connection speed, 2/ the average files sizes you share.
The script check to open slots every minute, if your upload speed is really high, or files sizes you send are small, then you will need to set this to a number of slots higher than 1.
It's easy, if you send a file in less than a minute, it's clear you need 2 minimum slots, if you send the two files in less than a minute, then you need 3... For most people, 1 is a good value.
Note: this could be change while the script is working with /sdset slots

$slotMax=4;
This is the default number of maximum slots the script is allow to open.
Because the script use dynamics slots, it could open new slots, this number is here to limit the script opening too much slots.
How you know what is the better value for $slotMax ?
It's : Your maximum upload speed / (divide by) a typical downloading speed.
ie: If your upload speed is 16000cps (512kb aDSL speed), we knows that 56kb modems users could do 4000cps (yeah it's an average). So 16000 / 4000 = 4 maximum slots.
In case you doubt, yes, $slotMin=1; and $slotMax=4; the script is setup by default for a aDSL 512kb server.
Note: this could be change while the script is working with /sdset slots

$queNick=8;
This setup how many files a nick (a user) could put in your queue. Not much too say about that one, it totally depend on you.
Just remember, the script keep the queue upto 2 days. If you set a big value here, you will have a huge queue (and so users will wait longer).
Also remember, if you allow a 15 files queue by users, and your files are 1Gb big, then the next user in your queue could wait that you finish sending 15Gb to the first user, not a problem if you have a 1gb/s upload speed, the next user will only wait 15 seconds...(i wish too have that kind of speed too)
Note: this could be change while the script is working with /sdset que

$findCmd="@find";
This is the trigger the script will use to answer to a user requesting a search on servers.
You can put any word you want. Some people prefer use locator to set it up, just do $findCmd="@locator";

$allowFind="true";
This allow the find command works, i didn't say @find because you could change it (see upper).
The script can disable itself this feature in case you have the Target Change Too Fast error.
Note: You cannot enable/disable that function. The script can disable it, but it also try to reenable it later.

$maxFind=6;
This setup the number of results SDClone should return to a find request.
In fact this is use anywhere the script need to return files results to a users (like in the -que function).
This size can be change by the script in order to avoid a Target Change Too Fast error.
Note: You cannot enable/disable that function. The script can disable it, but it also try to reenable it later.

$followLink="true";
This allow the script to follow all symbolics links to find files...
if you wish disable that option just set $followLink="false";
Note: if that option is enable, the script will told you a warning. Because following links could be dangerous if you don't know what you are doing. Remember the script grabs files from links it will found. ANY links even the links you have forgot. So if you want share files that are in ~/mp3share and a symbolic link in that directory exist pointing to ~/mydocs the script will share also the files in ~/mydocs !
If you know what you are doing, you can ignore that warning.

$useMOTD="true";
By default this function is enable so the script try to load the Message Of The Day file to add it in your list header. This is a common function to add something to your list without having to edit it by hands.
If the script can't find the MOTD file it will just ignore it, else it will add it. So it's safe to keep it to "true".

$noUnderscore="true";
By default, enable the script to convert filenames in your list with a _ char to a space char.
This does nothing except make a nicer list...
ie: dead_can_dance_-_aion.mp3 is convert to dead can dance - aion.mp3

$listShowSize="true";
If enable the filesize is display in your list (with the filename), if disable then...
ie: dead can dance - aion.mp3...................................3.2M

$useZIP="true";
Your list is a simple text file, with directory listing, filenames and filesize (if you allow it to be display).
If enable, the script will use the zip program to reduce the size of the list. And because the list is a text file, zip can reduce its size upto x10 !

$MOTDfile="sdclone-motd.txt";
This is where you setup the name of the MOTD file. you can add a directory but the MOTD file is always related to your ~/.xchat/sdclone directory. So by setting $MOTDfile="bob/mymotd.txt"; the script will try to load ~/.xchat/sdclone/bob/mymotd.txt.

$ServerEnable="false";
If you plan using SDServer to control SDClone, then you need to enable that function.
If you don't know what it does, what is SDServer... just leave it as the default value.

$ServerKey="asimplepassword";
As you see the default password sucks :-), but it's a simple one.
Here you specify the password an SDServer computer must know to chat with your SDClone.
Note: spaces are not allow in the password !

$autoJoin="true";
If the script pass from any state to status ON then the script will auto-join the serving channels you have define.
Even if the script was already ON To do that /sdclone on
Note: Currently there is no error detection on join, the script will say "I have join #x" even if it can't (channel is limit, private, or you are ban from #x...)

$unVoice="true";
This setting (if true) will make the script say to every channels where you are and where you serve your files, the word you define in $unVoiceMsg. By doing that the script inform users it pass from an ON status to an OFF or QUE mode. See /sdhelp sdclone for details about different status the script can have.

$unVoiceMsg="!devoice";
This is the word the script should say when it goes down (stop serving files).

$SDHandleSend="auto";
This is how the script should handle your sends.
Possible values are on, off or auto.
Leave it as-is for now. Check the explain with /sdhelp sdcontrolsend
Note: this could be change while the script is working with /sdcontrolsend

$autoBan="true";
This allow the script to ban a user if a ban condition is true. The script have 4 ban conditions. If a user is ban, the script will :
- Clear all files that user have in your queue.
- No more accept requests from that user.
- Stop all current upload to that user.

$autoBan_que="true";
If enable the script will ban a user that is doing too short queue request (doing @yourtrigger-que two times in less than 5 minutes).
Showing to a user the files he have in queue does that:
- Eat your CPU to search for his files in your queue. Specially if your queue is big.
- Eat your bandwith to display the answers.
There is a well know technic use by some lamers to get files from SDFind & SpRJukebox. These scripts don't save queue. So they ask a file, then do @yourtrigger-que a lot of time to make the server flood.
Once the server flood itself, these scripts will clear the queue and restart. So dump ass that does that, now just need to request a file and as he will be the first, he will get it.
Note: $autoBan_que="true"; MUST be set in order to use that function.

$autoBan_all="true";
This will ban a user doing a find request for all files @find *.*.
Again some lamers do that, because searching for all files you have isn't necessary as you display it in your banner or with @yourtrigger-stats. But they just try to fuck your server.
Even if you didn't allow the script to ban him, the script will NOT answer to that kind of search (as it's stupid).
Note: $autoBan_que="true"; MUST be set in order to use that function.

$autoBan_DNS="true";
With that, the script check your queue to find same ident for two different nick.
The script will ban a user if all that conditions are meet :
- Two nicks with the same ident are present in your queue
- That two users are connect and present in serving channel with you (so they wait files)
This is a technic use by some lamers to bypass your queue by users limit.
ie: if you have a "queue" limit to 8 files, 2 x 8=16 files for the same person can be put in your queue.
Note: $autoBan_que="true"; MUST be set in order to use that function.

$autoBan_ext="false";
This allow the script to ban a user that is searching files by extension. So if it's enable and a user do @find *.mp3 or @find *.jpg the script will ban him.
Some channels didn't allow that kind of search to be made, some allow it. This is an hard search for your CPU. Think about it, it could be a good idea to enable it ! If you share 43000 files and you have 13000 txt in it, a user doing @find *.txt will make your CPU browse 43000 files and find 13000 answers...
Note: $autoBan_que="true"; MUST be set in order to use that function.

$showGet="true";
That function is only use to show the files you are downloading when a user use !yourtrigger-slots.
If you prefer keep that private, just disable it.

$showSend="true";
That function is only use to show the files you are uploading when a user use !yourtrigger-slots.
If you prefer keep that private, just disable it.

$sdShowUpload="true";
If enable the script will open a TAB in xchat call ]SD-Upload[ where it will record every files you have upload (send) to someone.
If you have enable logging in xchat, that TAB will be saved in xchat logs.

$sdShowDownload="true";
If enable the script will open a TAB in xchat call ]SD-Download[ where it will record every files you have download (get) from someone.
If you have enable logging in xchat, that TAB will be saved in xchat logs.
Yes, this TAB is nearly always empty.

$userTracking="true";
This allow SDClone to create a file with infos about a user :
- Keep user ident
- Keep user requests (for files, to server...)
- Keep user upload stats
- Keep user language preference
...
Setting that to $userTracking="false"; will prevent SDClone take your harddisk space BUT also disable or limit a lot of functions :
- the /sduserinfo command
- the /sdclearusers command
- the @trigger-language user command
- the @trigger-leech command
- The $ShowOnComplete
- !seen user command

$userTrackingOnFind="true";
When a user do a command specific to your server by using your trigger, the first time the script will create a file information for that user.
By settings $userTrackingOnFind="true"; you allow the script to also create the file if a user use the find command @find by default.
Note: $userTracking="true"; MUST be set in order to make that one works.

$ShowOnComplete="true";
When the script has finish sending a file to someone, you can allow him to output that user stats.
If you prefer keep it secret, you can disable that, the script will still count the user file, but just stop show that stats when a file send is finish.
Note: $userTracking="true"; MUST be set in order to make that one works.

$ShowOnCompletePrivate="false";
If you set it to false the script will output the user stats to all serving channels.
If set to true the stats will only be output to the user.
Note: $userTracking="true"; MUST be set in order to make that one works.
Note: $ShowOnComplete="true"; MUST be set in order to make that one works.

$dailyReport="true";
If enable (as default), the script will do that everyday :
- Show to serving channel the daily report skin (#3)
- Clear the daily record speed and nick

$shoutRecord="true";
If enable the script will output to all serving channels the new today send record if it is broken by someone.
Note: Every day, that record is clear.
It's also the value Dynamics Slots use to calc your upload speed.

$useSeen="true";
If enable the script allow user to use !seen trigger to get info about a user.
As the script track only users that have done requests to you, this seen system is limited. So if you use a real seen script you can disable the one build-in SDClone.
Note: $userTracking="true"; MUST be set in order to make that one works.

$useButtons="true";
It just display buttons in xchat :
- SD-ON do /sdclone on
- SD-OFF do /sdclone off
- SD-Help do /sdhelp
- SD-Status do /sdstatus

$bannerTimer="350000";
It's the time the script will wait before output your banner message (the skin n°1).
That number represent milliseconds. So if you wish to show your banner every 5 minutes.
5x60x1000= 5 m or 300s or 300000 ms
Don't put a number too low, most channels will not like that.
Take note that some channels force that value to a number.

$checkTimer="30000";
It's the time (in ms) the script will wait before check conditions to open a new slot, close slot... and update current infos about sends, gets, bandwith...
Setting a too low value will make dynamics slots crazy, setting a high value will lower the bandwith, upload... stats less accurate.
Default value is a good choice.

$DynamicSlots=1;
Here you can set how Dynamics Slots should works...
Options are given here as references, but you should look in the FAQ for explain or online help with /sdhelp sdset
0 - Record send / 2
1 - Record send - $DynamicValue;
2 - $DynamicValue
Note: to disable Dynamics Slots set $slotMax=$slotMin;

$DynamicValue=4500;
That number is use in case you choose option 1 or 2 in Dynamics Slots
It represent a speed in cps.
Take a close look in the FAQ to understand how this value will be use. Setting a too high or too low number here can block the script.
The default values for $DynamicSlots and $DynamicValue are set to open a new slot if you have enough bandwith remain to handle another 56kbps user.

$smallFile="true";
If enable (as by default) the script will check every file request to see if the file size is lower $smallSize value, if it's true, then that file will be consider as a small file and specials rules will be apply to it.
Here are that rules for a small file :
- Its size is less or equal to $smallSize
- Will be sent if script is in mode ON or END
- Always bypass $slotMin value
- Can bypass $slotMax value
- Is also an $otherFile and so respect the rules for them
So, in most case, a small file will wait 1 or 2 minutes maximum in queue before the script start sending it.

$smallSize=512000;
It's the size that will be use to check for a small file.
This number represant the size in bits. So to set it to 10kbs, set it to $smallSize=10240;.
By default this value is 500kb (512000 / 1024).

$otherFile=3;
The other files are files that have specials rules for the script, currently only 2 types of files are considered as other files.
- Your list
- small files
So if the script encounter an other file it will apply theses rules for sending it :
  1. If the total files you are sending (the Slots-In-Use, or SIU to make it short) is less the value set in $slotMax, a new slot will be open.
  2. If SIU is equal to $slotMax value, a new slot will be open. Upto the value you have set in $otherFile
  3. If SIU is equal or highter $slotMax+$otherFile, no slot will be open
    - If the file is your list, a message will be sent to user, asking him to re-request your list later.
    - If the file isn't your list, the file will stay in queue until condition #1 or #2 is true.
With that you can calc the really maximum slots the script can open to send files:
If $otherFile=2; and $slotMax=4; then
- Script can open upto 6 slots to send files (4 + 2)
- Script can upload 4 normal files max with that 6 slots
- Script can upload 6 other files max with that 6 slots
I'm sure it's not clear ! I should find someone better in english to explain that.

$useLog="true";
Enable SDClone to log to a file (~/.xchat/sdclone/sdclone.log) the messages the script has sent.
You can disable it to save your harddisk space.


Join Linux, share your knowledge...
Host by ETECHNOVA !
Hosted by www.Geocities.ws

1