                                   JanBot

                                 written by

                              Jan F. Leversund
                           (kluzz@solo.lhg.hib.no)


[1] What the heck is JanBot?

    JanBot is a concurrent file server for iRC.   It hangs out on iRC like
    most other iRC automatons/robots, and acts like an FTP server for it's
    users.  It does however NOT sit on any channels, and does not have any
    vanity features like channel or user protection.   If that is what you
    are looking for,  you'd be better off getting eggdrop, vladbot or some
    of the numerous "battle & rampage" bots available. JanBot is, and will
    never be anything but, a sophisticated file server. But it's extremely
    good at it's job.

    JanBot is written in C by Jan Fredrik Leversund (KluZz@iRC),   and was
    initially  developed on Linux.   It has been reported  to require only
    minor changes to  compile on FreeBSD & NetBSD,  and the author has had
    success in porting it to Solaris 2.4 and BSDi.   It will in the future
    have more automated configuration procedures.

[2] But isn't this just a simple robot without any channel features?

    Both yes and no. JanBot not a simple robot.  Under the hood is a quite
    powerful multiprocess robot engine, which makes it possible for JanBot
    to serve many users simultaneously, serve them well,  and last but not
    least; serve them fast.  In order to do this, all unecessary features,
    like channel/user protection,  botlink networks,  "battle and rampage" 
    features and so on has been dropped,   and all the work has been about
    improving reaction times, DCC speeds, ease to use, etc. Everything has
    been done to make this the _BEST_ iRC file server available. Here is a
    list of some of the features in this wonder of modern programming:

    * Multiprocess:  JanBot sets up a separate process  for each connected
      user. This process handles all the DCC requests for this user, which
      means that a LOT of DCCs can be handled simultaneously,  the chances
      of disturbing other users are minimized,  and the interface reaction
      time is improved drastically.  "Disturbing other users"  is merely a
      nice way to say that if one user puts heavy load on JanBot,  it will
      not affect the DCC & reaction speeds for the other users, except for
      whatever is due to system limitations.

    * Speed:  JanBot uses the ultra fast HyperDCC  technology to bring the 
      DCC speeds right up there with FTP.  The technology was developed by
      Annatar@iRC (annatar@cow.pasture.com), who has put a lot of time and
      effort into developing the "HyperDCC theory of DCC speed increases".
      The usual DCC implementation  is probably one of the least effective
      transfer protocols around, with it's  "Have you got it? Yes I've got
      it" transfer method.  People have  reported speed increases of up to
      60% after  HyperDCC was implemented,  which is quite an achievement.
      NOTE:  HyperDCC does not require a  special client to receive files,
      it's merely a server side implementation.

    * Ease: JanBot has incorporated a set of commands especially developed
      to make the server easy and quick to use.  Most commands accepts any
      POSIX Extended Regular Expressions as parameters (don't worry if you
      don't know what that means,  it just means it works),  including the
      SEND/GET and CD commands, and the robot will queue all requests that
      exceeds the user's  DCC limit.  And as if that's not enough,  JanBot
      will automatically generate tarfiles if a directory is requested for
      sending, or it will recurse through the directory, sending all files
      it encounters. All of this of course at hyperspeed.

    * Individualism:  Each user has a quite  extensive set of  information
      stored,  including nickname,  allowed hostmasks, encrypted password,
      user level, flags applying to each user,  and so on.  Whenever these
      records are altered, the changes will be stored,  and the robot will
      "remember" all the settings next time the user connects.

    * mIRC Support:  One of the most widely  used iRC clients  nowadays is
      the mIRC client for Windows(tm), written by Khaled Mardam-Bey.
      Although not everybody likes this client  (the author of JanBot does
      indeed hate it),  it does have a useful  feature in the "DCC Resume"
      protocol.   This makes it possible to resume an interrupted transfer
      at the point where it was cut off.  And guess what:  JanBot supports
      it! Yes sir,  you can safely press the "Resume" button whenever mIRC
      asks you to,  and JanBot  will nicely resume the file at the correct
      position. This even works for the automatically generated tar files.
      Right now,  JanBot will NOT request a  DCC Resume if you are sending
      a file to it. This will probably be added shortly.

    * Upload/Download ratios:  A very common feature among the more hitech
      FTP servers is a ratio system.  Basically it  makes sure that anyone
      using the server gives something instead of just leeching. Commonly,
      there's a ratio of 1 : something, meaning that if a user uploads say 
      1mb,  he is allowed to download 5mb in return.  This system has also
      implemented in JanBot, and if required,  it can be compiled into the 
      JanBot binary.

[3] Wow, I like this! Where can JanBot be found?

    The latest version of JanBot can always be found at:

    * ftp://ftp.lhg.hib.no/pub/irc/janbot/

    Just go for the file with the highest version number.

[4] Okay, I got the file, now what do I do?

    Now you need to install the bot on your system.  If you go through the
    following steps,  it should be ready to use.  Depending on what system
    you are on, you might need to do some hacking to make it work, as  the
    autoconfig  stuff is still missing.  There's not any magic involved in
    setting up the bot, but some familiarity with the basic workings of an
    irc automaton is recommended.

    1. Look at the config.h  file and change  whatever you find necessary.
       This step is not really required, as most of the stuff there can be
       specified in the configuration file.

    2. Type 'make'.  Hopefully all files are built correctly,  and the bot 
       executable is linked.  If not, happy debugging ( 'make debug'  will
       compile the bot in debug mode ).  You might get some warnings about
       printf() not  supporting %llu when you're trying to compile the bot
       on Solaris, but you can just ignore these.  Also BSDi seems to have
       some  complaints  about some include  files,  but these can also be
       safely ignored, as they have no effect on the result. 

    3. Copy the  sample.janbotrc  to  ~/.janbotrc,  or to a file  of  your
       choice.  JanBot will  look for  ~/.janbotrc by default,  unless you
       specify otherwise using the -l command line parameter.

    4. Edit the file you copied to fill your needs.  Pay special attention
       To the Nick and  Server config  lines.  Some of the config tags are
       only operational if  certain parts of the code is compiled into the
       bot binary.

    5. If you do not already have a userlist,  run janbot with the command 
       line parameter -m to create a master user. Level 2 is master level.

    6. Start the bot.  If everything goes well, you should be able to make
       contact with your bot on irc.  Try /CTCP <botnick> HELP to get some
       help to get started.

    That's just about it. All maintainance is done from iRC, so you should
    not need to edit any of the files anymore,  except maybe the .janbotrc 
    when new servers needs to  be added and so on.   You no longer need to
    restart the robot to activate all changes,   as most parts of the file
    can be rehashed at run time.

[5] It is mine, mine, all mine!

    JanBot  is  copyright (c)  by  Jan Fredrik Leversund.  You are granted
    permission  to use it as long as this copyright notice is intact.  You
    may alter the code in any way you want, but if you chose to do so, you
    may NOT distribute the altered code,  except as separate modifications
    or patches. I do not like having "mutated" versions of JanBot floating
    around that might contain backdoors or bugs, as it may cause a serious
    dent in my credibility (<Jizmak> What credibility?).

[6] It's not my fucking fault!

    The author of JanBot  is not to be held  responsible for any damage to 
    software or hardware,  lost income,  broken refridgerators,  divorces, 
    mutated children, dog poo on the floor,  natural disasters, invasions,
    burglaries, flat tires and so on.  You are using this software at your
    own risk, so if shit happens: It's not my fucking fault!

[7] My eternal gratitude to:

    * The people on Drive By Net 3, for months after months of testing and
      suffering. I couldn't have done it without you.
    * Annatar (also DBN3) for developing the HyperDCC  technology which is 
      partially what makes JanBot so unique,  and for helping out on a lot
      of the programming issues.
    * Probably a lot of others too.  I can't remember right now.

[8] Big fuck you's to:

    * The Norwegian Armed Forces  for wasting one fucking year of my life,
      which I could have spend working,  being productive and last but not
      least, making money. I spent 1/22 of my life working for you morons,
      and what do I have to show for it?  I don't think my corporal salary
      makes up for those 31,5 million seconds of utter boredom. GRRR!@$

Ththththat's all folks!
