Iroffer Tutorial

Aus Fansub-Wiki
Zur Navigation springen Zur Suche springen

Iroffer ist eine weitverbreitete Software zum Anbieten von Dateien über sog. XDCC-Bots. Hier wird im folgenden auf die Vorbereitung, Installation und Konfiguration eines solchen XDCC-Bots eingegangen.

Was ist Iroffer ?

Iroffer ist eine Software die als sog. Fileserver (Dateiserver) im IRC agiert. Man kann es etwa mit einem Webserver oder einem FTP vergleichen, nur das hier nicht das HTTP- bzw FTP-Protokoll verwendet wird. Für den Transfer wird hier das DCC-Protokoll, welches ein Teil des IRC's ist benutzt. Im Gegensatz zu ähnlichen Programmen ist Iroffer kein Script, sondern ein eigenständiges ausführbares Programm. Es ist auf sehr hohe Leistungfähigkeit bei kleinem Systemresourcenverbraucht (CPU, RAM, HDD) ausgelegt. Iroffer ist für die Betriebsysteme Windows sowie Unix bzw. Linux erhältlich.

Was brauche ich für meinen Bot und wo bekomme ich es ?

Man benötigt einen Computer mit breitbandigem Anschluss (DSL sollte es mindestens sein), der über genügend Uploadbandbreite verfügt (>=16 kb/s) oder einen vServer/Rootserver. Auf diesem PC sollte ein *nix bzw. Windows laufen, sowie je nach Menge der zu sharenden Datei entsprechend Speicherplatz. Für Iroffer selbst kann man etwa 3 MB rechnen, der Rest sind nur die zu sharenden Dateien. Wenn dies alles vorhanden ist, brauchen wir noch die entsprechende Irofferversion für unser Betriebsystem.

Iroffer original:

Iroffer Dinoex Mod:

Die Dinoex Mod enthält verschiedene Modifikationen gegenüber dem originalen Iroffer, die wahrscheinlich am herrausrangenste ist die Möglichkeit, Dateigruppen anzulegen und damit die Datein auf dem Bot zu sortieren. Aber des ist nicht alles, wer es genau wissen möchte, kann sich die Readme durchlesen. Diese Mod ist neben der Originalversion die am häufigsten anzutreffende Modifikation in der deutschen Fansubscene.


Installation

Linux

Wenn wir die Sourcen heruntergeladen haben von der gewünschten Version, geht es weiter wie folgt:

  • Entpacken der Sourcen & wechseln ins neue Verzeichnis:
tar -xzvf <name der heruntergelandenen datei>
cd <name des entstandenen verzeichnisses> 
  • Starten des Konfigurationsscripts, welches uns eine make-Datei für unser System erstellt:
./Configure
  • Starten des Kompilationsprozesses, wenn keine Fehler beim durchlaufen des Konfigurationsscripts auftraten:
make
  • Wenn gewünscht, können wir nun die auführbare Datei systemweit verfügbar in /usr/local/bin installieren (optional und es werden hierfür root Previlegien benötigt):
make install
  • Wenn Iroffer nicht systemweit installiert wird, bitte die ausführbare Datei "iroffer" aus dem Sourcenverzeichnis zum gewünschten Ausführungsort verschieben.

Damit ist die Installation von Iroffer unter Linux abgeschlossen und wir können uns der Konfiguration unseres Bots zuwenden.

Windows

Wenn wir die Binary von der gewünschten Version heruntergeladen haben, gehen wir bei und entpacken mit einem Packer die .zip-Datei in ein Verzeichnis unserer Wahl auf der Festplatte. Damit ist unter Windows die Installation abgeschlossen, und wir können mit der Konfiguration des Bots fortfahren.

Konfigurieren von Iroffer

Allgemeine Konfiguration

So sieht die mit Iroffer Original 1.3 ausgelieferte Konfigurationsdatei aus, die einzigen Änderungen gegenüber dem Original sind die Übersetzungen der Beschreibungen der einzelnen Optionen:

##############################################################################
##                       iroffer 1.3.b09 config file                        ##
##            lines starting with "#" or are blank are ignored              ##
##############################################################################

# Version of this file:
#
# @(#) sample.config 1.114@(#)
# pmg@wellington.i202.centerclick.org|sample.config|20040823145918|21802
#

##############################################################################
##                                  FILES                                   ##
##############################################################################


##############################################################################
###                             - pid file -                               ###
### Schreibt die Prozess-ID beim Start in diese Datei                      ###
pidfile mybot.pid

##############################################################################
###                             - log file -                               ###
### logfile gibt die Logfile für den Bot vor. logstats sendet statistische ###
### Informationen an einen eventuell aktiven DCC-Chat. Mögliche Werte yes  ###
### (ja) und no (nein). logrotate gibt den Zeitraum vor, nach dem die Log- ###
### Datei gewechselt wird, mögliche Werte monthly (monatlich), weekly      ###
### (wöchentlich) und daily (täglich).                                     ###
logfile mybot.log
logstats yes
logrotate weekly

##############################################################################
###                             - state file -                             ###
### Diese Datei dient als temporäres Datenlager für statistische Daten     ###
### zwischen den Neustarts von Iroffer                                     ###
statefile mybot.state

##############################################################################
###                         - xdcc listing file -                          ###
###  In diese Datei wird ein vollständiges XDCC-Listing exportiert, umzb.  ###
###  als Packliste auf einer Webseite zu dienen, oder für andere Zwecke    ###
#xdcclistfile mybot.txt


##############################################################################
##                                   IRC                                    ##
##############################################################################

##############################################################################
###                          - connection method -                         ###
### Wie Iroffer sich zum IRC-Server verbinden soll, möglich ist:           ###
###  direct                     - verbindet direkt zum Server (normalfall) ###
###  bnc <ip> <port> <password> <vhost>                                    ###
###                             - verbindet zum IRC-Server über eine BNC   ###
###                               verbinden über <ip>:<port> unter         ###
###                               Verwendung von <password>                ###
###                               <vhost> ist optional                     ###
###  wingate <ip> <port>        - verbindet den Bot zum Server via einem   ###
###                               Wingate Gateway an <ip>:<port>           ###
###  custom <ip> <port>         - verbindet den Bot zum Server durch       ###
###                               anwendung benutzerdefiniert Kommandos    ###
###                               mehr dazu weiter unten bei proxyinfo     ###
### die meisten leute werden im Normalfall "direct" benutzen               ###
connectionmethod direct


##############################################################################
###                       - custom connection info -                       ###
### wenn "connectionmethod custom" verwendet wird,      ###
### custom lines for use with your proxy/gateway/redirector. Place "$s"    ###
### and "$p" where the server and port should be placed in your text       ###
#proxyinfo connect $s:$p
#proxyinfo blah blah


##############################################################################
###                         - onjoin information -                         ###
### you can use server_join_raw to send raw IRC commands to the server     ###
### when connected (sent after NICK, USER, before MODE )                   ###
###                                                                        ###
### you can use server_connected_raw to send raw IRC commands to the       ###
### server when connected (sent after MODE, before JOIN )                  ###
###                                                                        ###
### you can use channel_join_raw to send raw IRC commands to the           ###
### server when you join a channel (multiple instances can be configured   ###
### if needed)                                                             ###
###                                                                        ###
### multiple instances of all 3 can be configured if needed                ###
#server_join_raw
#server_connected_raw
#channel_join_raw


##############################################################################
###                             - nickserv -                               ###
### if you would like to register with nickserv add settings here          ###
#nickserv_pass mypass


##############################################################################
###                         - server information -                         ###
### List server/ports in the form "server irc.domain.com 6667". Port is    ###
### optional (default 6667)                                                ###
### Multiple servers can be specified                                      ###
server irc.efnet.net

##############################################################################
###                         - channels (upto 50) -                         ###
### channel format:                                                        ###
### "channel <channel> [-plist <time>] [-plistoffset <time>]               ###
###    [-pformat <full|minimal|summary>] [-key <key>] "                    ###
### plist: time is number of minutes between plists.                       ###
### plistoffset: time is number of minutes to offset list                  ###
### pformat: full is normal and default if pformat is not used             ###
###          minimal is similar to full but removes some lines             ###
###          summary displays only a 2 line summary                        ###
### key:     for +k channels, the key specified is used when joining       ###
### using same or multiples of the same number plist time is recomended    ###
#channel #chan01
#channel #chan02 -plist 14
#channel #chan03 -plist 28 -pformat minimal
#channel #chan04 -plist 14 -pformat summary -key thekey


##############################################################################
###                          - user information -                          ###
user_nick mybotDCC
user_realname My Bot
user_modes +i


##############################################################################
###                            - virtual hosts -                           ###
### If the computer you want to run iroffer on has multiple local IP       ###
### addressses, you can run iroffer on any of those ip addresses.          ###
### To automatically choose a local IP address leave undefined.            ###
### NOTE:  You must use the IP address in x.x.x.x format not a DNS name.   ###
#local_vhost 123.456.789.123

##############################################################################
###                      - incoming TCP connections -                      ###
### If you are behind a firewall that you control and want to have iroffer ###
### use a specified range for tcp ports for incoming connections set       ###
### tcpstartrange to the first port used (ports will be used from that     ###
### number upwards as needed (usually 1 per transfer attempt).             ###
### If undefined, incoming tcp ports are automatically choosen by the OS.  ###
#tcprangestart 4000

##############################################################################
###                       - override unix loginname -                      ###
### Override your unix loginname. Will only work if identd isn't running.  ###
#loginname fakelogin


##############################################################################
###                      - manual dcc ip translation -                     ###
### if you are behind a NAT (Network Address Translation) device which     ###
### _does_ _not_ intercept and translate dcc commands but _does_ do port   ###
### forwarding place the ip address of the NAT below if unsure, leave      ###
### commented                                                              ###
### NOTE:  You must use the IP address in x.x.x.x format not a DNS name.   ###
#usenatip 123.456.789.123


##############################################################################
##                                   xdcc                                   ##
##############################################################################

##############################################################################
###                         - maximum xdcc slots -                         ###
slotsmax 20

##############################################################################
###                         - Queue Information -                          ###
### Main Queue Size, set to 0 for no queue                                 ###
queuesize 10

##############################################################################
###                      - max transfers per person -                      ###
### maximum transfers per person at a time                                 ###
maxtransfersperperson 1

##############################################################################
###                     - max queued items per person -                    ###
### maximum number of times a user can be in a queue simultaneously        ###
maxqueueditemsperperson 2

##############################################################################
###                 - add/chfile command helper directory -                ###
### optional directory where iroffer will look after trying normal         ###
### relative/absolute paths when using the add or chfile admin command.    ###
### Add/chfile will first try to open the file using just the argument you ###
### provide to the command, and if that fails it will try again with       ###
### filedir added to the front of the argument.                            ###
#filedir /home/me/files

##############################################################################
###                  - restrict xdcc list and xdcc send -                  ###
### if set, xdcc list and/or xdcc send|info will be restricted to users    ###
### who are on a known channel. If a user is not on one of the known       ###
### channels they will not be able to list and/or get packs                ###
### restrictprivlist disables all private xdcc list requests completely.   ###
### use restrictprivlistmsg to change the message that restrictprivlist    ###
### sends                                                                  ###
#restrictlist
#restrictprivlist
#restrictprivlistmsg Wait for public list in the channel.
#restrictsend

##############################################################################
###                      - channel xdcc commands -                         ###
### if set, iroffer will respond to xdcc requests sent to a channel in     ###
### addition to xdcc requests sent to iroffer directly.                    ###
respondtochannelxdcc

##############################################################################
###                      - channel !list command -                         ###
### if set, iroffer will respond to !list requests sent to a channel       ###
#respondtochannellist

##############################################################################
###                   - bypass queue for small files -                     ###
### If someone requests a small file, bypass queue and max sends.  If the  ###
### offered file is under this size (in KB), send immediately.             ###
#smallfilebypass 0

##############################################################################
###                      - authorized download hosts -                     ###
### Specify who can download from this bot.  Use *!*@* to allow anyone.    ###
### Multiple hostmasks can be specified                                    ###
### wild cards are:                                                        ###
###  * = 0 or more characters,  ? = 1 character,  # = any positive integer ###
downloadhost *!*@*
#downloadhost *!~me@*.domain.com
#downloadhost *!me@192.168.10.#


##############################################################################
##                               Network Usage                              ##
##############################################################################

##############################################################################
###                      - Allow with low bandwidth -                      ###
### If packs are queued, and the bandwidth usage is below this amount, a   ###
### queue'd person will be sent their pack. (K/sec)                        ###
### WARNING! do not set this amount to an unreasonably high number!        ###
#lowbdwth 15

##############################################################################
###                         - transfer min speed -                         ###
### Per-transfer min speed in KB/sec used unless 'chmins' set per pack.    ###
#transferminspeed 10

##############################################################################
###                         - transfer max speed -                         ###
### Per-transfer max speed in KB/sec used unless 'chmaxs' set per pack.    ###
#transfermaxspeed 50

##############################################################################
###                        - bandwidth limiting -                          ###
### Is your sysadmin complaining about you using up too much bandwidth?    ###
### You can set a maximum KB/sec that will be sent to the network.         ###
### You can define two different limits depending on time of day,          ###
### overallmaxspeed is the general limit, overallmaxspeeddayspeed is the   ###
### limit during the hours defined by overallmaxspeeddaytime (0 ... 23)    ###
### (no looping) and durring days of week ( MTWRFSU )                      ###
#overallmaxspeed 300
#overallmaxspeeddayspeed 100
#overallmaxspeeddaytime 9 17
#overallmaxspeeddaydays MTWRF


##############################################################################
##                                   Other                                  ##
##############################################################################

##############################################################################
###                          - autosend feature -                          ###
### Set if you want iroffer to automatically send a pack when someone says ###
### a certain word pubically in a channel.                                 ###
### autosendpack <pack#> <trigger> <message ...>                           ###
###               == MOST USERS WILL NOT NEED THIS FEATURE ==              ###
###             == GET PERMISSION FROM YOUR CHANNEL OPS FIRST ==           ###
#autosendpack 1 !rules Sending you the rules.

##############################################################################
###                             - headline -                               ###
### Put a headline at the top of all xdcc lists                            ###
#headline New Stuff Just Added!!

##############################################################################
###                           - credit line -                              ###
### Put a credit at the end of your xdcc list                              ###
#creditline Brought to you by me

##############################################################################
###                         - index bot notify -                           ###
### if you want iroffer to periodically msg some nick for indexing or some ###
### other purpose use periodicmsg in the form:                             ###
### "periodicmsg <nick> <num minutes> <message ...>                        ###
#periodicmsg nick 10 index me

##############################################################################
###                        - remote admin info -                           ###
### Remote commands can only be issued by a nick with a matching hostmask  ###
### and knows the adminpass Remote commands are issued by dcc chat or by   ###
### /msg nickDCC admin 'adminpass' 'command' adminhost's are full          ###
### hostmasks: nick!user@host don't forget a "~" if you don't use identd   ###
### wild cards are:                                                        ###
###  * = 0 or more characters,  ? = 1 character,  # = any positive integer ###
### For security, your adminpass must be stored in the config file         ###
### encrypted.  To generate an encrypted password run iroffer with the     ###
### "-c" flag and follow the instructions.                                 ###
adminpass add_your_encrypted_password_here
adminhost *!~me@*.domain.com
adminhost *!me@192.168.10.#

##############################################################################
###                          - upload directory -                          ###
### If you want iroffer to accept DCC transfers (upload) define one or     ###
### more uploadhosts and define an uploaddir where files should be saved.  ###
### uploadmaxsize if the maximum size in MB of any individual transfer,    ###
### files over that size will be rejected (0 for no limit).                ###
### wild cards are:                                                        ###
###  * = 0 or more characters,  ? = 1 character,  # = any positive integer ###
### WARNING!!  specify a directory used exclusivly for uploads. This will  ###
### WARNING!!  prevent users from creating/appending important files       ###
#uploadhost *!~me@*.domain.com
#uploadhost *!me@192.168.10.#
#uploaddir /home/me/upload
#uploadmaxsize 10

##############################################################################
###                          - hide OS information-                        ###
### If you do not want iroffer to show OS information in version and quit  ###
### messages enable this option                                            ###
#hideos

##############################################################################
###                              - log notices -                           ###
### If defined, iroffer will log notice messages to the msglog             ###
#lognotices

##############################################################################
###                           - timestamp console -                        ###
### If defined, iroffer will place timestamps on all console output        ###
#timestampconsole

##############################################################################
###                           - timestamp console -                        ###
### If defined, iroffer will suppress most informational messages to users ###
#quietmode

##############################################################################
###                       - periodic notify time -                         ###
### How often should iroffer notify users of queue/bandwidth status        ###
### (in minutes).  If not defined default is 5 minutes. Setting to 0       ###
### disables notification entirely.                                        ###
#notifytime 5

##############################################################################
###                         - punish slow users -                          ###
### If a user is disconnected due to failing to meet a minspeed            ###
### requirement, punish them by disconnecting all transfers/queues and     ###
### ignoring them for n minutes                                            ###
#punishslowusers 10

##############################################################################
###                      - disable md5sum of files -                       ###
### By default, iroffer will calculate md5sums all offered files.  If you  ###
### want to disable this feature define 'nomd5sum' below.                  ###
#nomd5sum

##############################################################################
##                                    End                                   ##
##############################################################################