home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / in4wjcxu / other / irc / doc / install < prev    next >
Encoding:
Text File  |  1996-08-14  |  39.8 KB  |  962 lines

  1. /************************************************************************
  2.  *   IRC - Internet Relay Chat, doc/INSTALL
  3.  *   Copyright (C) 1990,1991,1992, Jeff Trim, Mike Bolotski,
  4.  *   Jarkko Oikarinen and Darren Reed.
  5.  *
  6.  *   This program is free software; you can redistribute it and/or modify
  7.  *   it under the terms of the GNU General Public License as published by
  8.  *   the Free Software Foundation; either version 1, or (at your option)
  9.  *   any later version.
  10.  *
  11.  *   This program is distributed in the hope that it will be useful,
  12.  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  *   GNU General Public License for more details.
  15.  *
  16.  *   You should have received a copy of the GNU General Public License
  17.  *   along with this program; if not, write to the Free Software
  18.  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  */
  20.  
  21.             Installing IRC - The Internet Relay Chat Program
  22.  
  23.  
  24. Overview of this document:
  25.  
  26.   1) The config.h file
  27.   2) Editing the Makefile
  28.   3) Compiling IRC
  29.   4) The ircd.conf file
  30.  
  31.  
  32. 1) Edit the "config.h" file and make changes to the various #DEFINE's:
  33.  
  34.    a) Copy the config.h.dist file to config.h before editing.
  35.   
  36.    b) Define what type of UNIX your machine uses.
  37.  
  38.       Pick the machine type which best describes your machine and change
  39.       the #undef to #define (if needed).  Some flavours of Unix require no
  40.       #define and in such cases all others should be #undef'd.
  41.  
  42.    c) DEBUGMODE
  43.  
  44.     Define DEBUGMODE if you want to see the ircd debugging information
  45.       as the daemon is running. Normally this function will be undefined
  46.       as ircd produces a considerable amount of output.  DEBUGMODE must be
  47.       defined for either of -t or -x command line options to work.
  48.       
  49.    d) DPATH, SPATH, CPATH, MPATH, LPATH, PPATH
  50.  
  51.         DPATH is provided so that the other pathnames (SPATH, CPATH, etc)
  52.       may be provided in just filename form.  When the server starts, it
  53.       chdir's to DPATH before chroot or any other file operation, making
  54.       it the "current directory" for the server.  This is where core files
  55.       will go if it core dumps.
  56.  
  57.     Define SPATH to be the directory path to ircd.  This is usually
  58.       /usr/local/bin/ircd, unless you don't have installation permission
  59.       there. 
  60.  
  61.       Define CPATH to be the directory path to the "irc.conf" file.
  62.       This path is usually /usr/local/lib/irc.conf. The format of this file 
  63.       will be discussed later.
  64.  
  65.       The LPATH #define should be set to "/dev/null" unless you plan to 
  66.       debug the program.  Note that the logfile grows very quickly.
  67.  
  68.       Define MPATH to be the path to the 'motd' (message of the day) file
  69.       for the server.  Keep in mind this is displayed whenever anyone
  70.       signs on to your server.
  71.  
  72.       The PPATH is optional, but if defined, should point to a file which
  73.       either doesn't exist (but is creatable) or a previously used PPATH
  74.       file.  It is used for storing the server's PID so a ps(1) isn't
  75.       necessary.
  76.  
  77.    e) CHROOTDIR
  78.  
  79.     To use the CHROOTDIR feature, make sure it is #define'd and that
  80.       the server is being run as root.  The server will chroot to the
  81.       directory name provded by DPATH.
  82.  
  83.    f) ENABLE_SUMMON, ENABLE_USERS
  84.  
  85.     For security conscious server admins, they may wish to leave
  86.       ENABLE_USERS undefined, disabling the USERS command which can be used
  87.       to glean information the same as finger can.  ENABLE_SUMMON toggles
  88.       whether the server will attempt to summon local users to irc by
  89.       writing a message similar to that from talk(1) to a user's tty.
  90.  
  91.    g) SHOW_INVISIBLE_LUSERS, NO_DEFAULT_INVISIBLE
  92.  
  93.     On large IRC networks, the number of invisible users is likely to
  94.       be large and reporting that number cause no pain.  To aid and effect
  95.       this, SHOW_INVISIBLE_LUSERS is provided to cause the LUSERS command
  96.       to report the number of invisible users to all people and not just
  97.       operators.  The NO_DEFAULT_INVISIBLE define is used to toggle whether
  98.       clients are automatically made invisible when they register.
  99.  
  100.    h) OPER_KILL, OPER_REHASH, OPER_RESTART, LOCAL_KILL_ONLY
  101.  
  102.     The three operator only commands, KILL, REHASH and RESTART, may all
  103.       be disabled to ensure that an operator who does not have the correct
  104.       privilidges does not have the power to cause untoward things to occur.
  105.       To further curb the actions of guest operators, LOCAL_KILL_ONLY can
  106.       be defined to only allow locally connected clients to be KILLed.
  107.  
  108.    i) The rest of the user changable #define's should be pretty much self
  109.       explanatory in the config.h file.  It is *NOT* recommended that any
  110.       of the file undef the line with "STOP STOP" in it be changed.
  111.  
  112. 3) Configure and compile the code.
  113.  
  114.       Edit the root Makefile for the server, uncomment/comment the correct
  115.    CFLAGS/IRCDLIBS lines as appropriate for your system.
  116.       Change DESTDIR to be the same as the path for DPATH in config.h.
  117.    Type "make". This will compile the server, the client, and the services.
  118.    At the end of this step, the server directory will contain 'ircd',
  119.    and the client directory will contain 'irc'.  To get the server installed,
  120.    type "make install" which will build a default m4 file for preprocessing,
  121.    copy example.conf and put the server all in DESTDIR.  The irc client and
  122.    a copy of the server will also be placed in BINDIR and the modes set
  123.    accordingly.
  124.  
  125. 4) The ircd.conf file.
  126.  
  127.    After installing the ircd and irc programs, edit the irc.conf file
  128.    as per the instructions in this section and  install it in the 
  129.    location you specified in the config.h file.  There is a sample
  130.    conf file called example.conf in the /doc directory.
  131.  
  132.    Appendix A describes the differences between IP addresses and host
  133.    names.  If you are unfamiliar with this, you should probably scan 
  134.    through it before proceeding.
  135.  
  136.    The irc.conf file contains various records that specify configuration
  137.    options.  The record types are as follows:
  138.    
  139.    1.  Server connections       (C,N)
  140.    2.  Machine information    (M)
  141.    3.  Client connections    (I)
  142.    4.  Default local server    (U)
  143.    5.  Operator priviliges    (O)
  144.    6.  Administrative info    (A)
  145.    7.  Excluded accounts    (K)
  146.    8.  Excluded machines        (Q)
  147.    9.  Connection Classes       (Y)
  148.   10.  Leaf connections         (L)
  149.   11.  Service connections      (S)
  150.   12.  Port connections        (P)
  151.   13.  Hub connections        (H)
  152.  
  153.  
  154.    1. SERVER CONNECTIONS:  How to connect to other servers
  155.                How other servers can connect to you
  156.  
  157.    WARNING:
  158.      The hostnames used as examples are really only examples and
  159.      not meant to be used (simply because they don't work) in real life.
  160.  
  161.    Now you must decide WHICH hosts you want to connect to and WHAT ORDER you
  162.    want to connect to them in.  For my example let us assume I am on the
  163.    machine "rieska.oulu.fi" and I want to connect to irc daemons on 3 other
  164.    machines:
  165.  
  166.          "garfield.mit.edu"        - Tertiary Connection
  167.          "irc.nada.kth.se"         - Secondary Connection
  168.          "nic.funet.fi"            - Primary Connection
  169.  
  170.    And I prefer to connect to them in that order, meaning I first want to
  171.    try connecting to "nic.funet.fi", then to "irc.nada.kth.edu", and
  172.    finally to "garfield.mit.edu".  So if "nic.funet.fi" is down or
  173.    unreachable, the program will try to connect to "irc.nada.kth.se".
  174.    If irc.nada.kth.se is down it will try to connect to garfield and so forth.
  175.    PLEASE limit the number of hosts you will attempt to connect to down to 3.
  176.    This is because of two main reasons:
  177.      a) to save your server from causing extra load and delays
  178.         to users
  179.      b) to save internet from extra network traffic
  180.         (remember the old rwho program with traffic problems when
  181.         the number of machines increased).
  182.  
  183.    The format for the CONNECT entry in the "irc.conf" is:
  184.  
  185.        C:<TARGET Host Addr>:<Password>:<TARGET Host NAME>:<TARGET Host PORT>
  186. Field: 1        2              3                4               5
  187.  
  188.    for example:
  189.    
  190.     C:nic.funet.fi:passwd:nic.funet.fi:6667 
  191.  
  192.           - or -
  193.  
  194.     C:128.214.6.100:passwd:nic.funet.fi:6667
  195.  
  196.           - or -
  197.  
  198.     C:root@nic.funet.fi:passwd:nic.funet.fi:6667
  199.  
  200.  
  201.     Explanation:
  202.  
  203.     Each field is separated with a ":" charcter:
  204.  
  205.     Field 1: Field 1 tells the IRC program which option is being configured.
  206.              "C" corresponds to a server Connect option.
  207.  
  208.     Field 2: Specifies the host name or IP address of the machine to connect
  209.          to.  If "user@" prefixes the actual hostname or IP address
  210.          the server will require that the remote username returned by
  211.          the ident server be the same as the one given before the "@".
  212.  
  213.     Field 3: The password of the other host.  A password must always be
  214.          present for the line to be recognized.
  215.  
  216.     Field 4: The full hostname of the target machine. This is the name that 
  217.          the TARGET server will identify itself with when you connect 
  218.          to it.  If you were connecting to nic.funet.fi you would receive
  219.          "nic.funet.fi" and that is what you should place in 
  220.          this field.
  221.   
  222.     Field 5: The INTERNET Port that you want to connect to on the TARGET 
  223.          machine. Most of the time this will be set to "6667".  
  224.              If this field is left blank, then no connections will 
  225.              be attempted to the TARGET host, and your host will accept
  226.              connections FROM the TARGET host instead.
  227.  
  228.    Some examples:
  229.  
  230.             C:nic.funet.fi::nic.funet.fi:6667
  231.  
  232.             This reads: Connect to host "nic.funet.fi", with no password
  233.             and expect this server to identify itself to you as
  234.             "nic.funet.fi". Your machine will connect to this host to
  235.             PORT 6667.
  236.  
  237.             C:18.72.0.252:Jeff:garfield.mit.edu:6667
  238.  
  239.             This reads: Connect to a host at address "18.72.0.252", using a
  240.             password of "Jeff".  The TARGET server should identify
  241.             itself as "garfield.mit.edu".  You will connect to Internet
  242.             Port 6667 on this host.
  243.  
  244.             C:irc.nada.kth.se::irc.nada.kth.se
  245.  
  246.             This reads: do not attempt to connect to "irc.nada.kth.se",
  247.             but if "irc.nada.kth.se" requests a connection,
  248.             allow it to connect.
  249.  
  250.    Now back to our original problem, we wanted OUR server CONNECT to 3
  251.    hosts,  "nic.funet.fi", "irc.nada.kth.se" and "garfield.mit.edu" in
  252.    that order.  So as we enter these entries into the file they must be
  253.    done in REVERSE order of how we could want to connect to them.
  254.  
  255.    Here's how it would look if we connected "nic.funet.fi" first:
  256.  
  257.     C:garfield.mit.edu::garfield.mit.edu:6667
  258.     C:irc.nada.kth.se::irc.nada.kth.se:6667
  259.     C:nic.funet.fi::nic.funet.fi:6667
  260.  
  261.    Ircd will attempt to connect to nic.funet.fi first, then to irc.nada
  262.    and finally to garfield.
  263.  
  264.    Reciprocal entries:
  265.  
  266.    Each "C" entry requires a corresponding 'N' entry that specifies
  267.    connection priviliges to other hosts.  The 'N' entry contains
  268.    the password, if any, that you require other hosts to have before
  269.    they can connect to you.  These entries are of the same format as
  270.    the "C" entries.
  271.     
  272.    Let us assume that "garfield.mit.edu" connects to your server
  273.    and you want to place password authorization authorization on garfield.
  274.    The "N" entry would be:
  275.    
  276.           N:garfield.mit.edu:golden:garfield.mit.edu
  277.   
  278.    This line says: expect a connection from host "garfield.mit.edu",
  279.    and expect a login password of "golden" 
  280.    and expect the host to identify itself as "garfield.mit.edu".
  281.      
  282.       N:18.72.0.252::garfield.mit.edu
  283.  
  284.    This line says: expect a Connection from host "18.72.0.252", and 
  285.    don't expect login password.  The connecting host should identify itself
  286.    as "garfield.mit.edu". 
  287.  
  288.   
  289.    Wildcards domains: 
  290.     To reduce the great amount of servers in IRCnet wildcard
  291.     DOMAINS were introduced in 2.6. To explain the usage of
  292.     wildcard domains we take an example of such:
  293.         *.de  - a domain name matching all machines
  294.                         in Germany.
  295.         Wildcard domains are useful in that ALL SERVERS in Germany
  296.         (or any other domain area) can be shown as one to the
  297.     rest of the world. Imagine 100 servers in Germany, it
  298.     would be incredible waste of netwotk bandwidth to broadcast
  299.     all of them to all servers around the world.
  300.  
  301.     So wildcard domains are a great help, but how to use them ?
  302.     They can be defined in the N-line for a given connection,
  303.     in place of port number you write a magic number called
  304.     wildcard count.
  305.  
  306.     Wildcard count tells you HOW MANY PARTS of your server's name
  307.     should be replaced by a wildcard. For example, your server's
  308.     name is "tolsun.oulu.fi" and you want to represent it as
  309.     "*.oulu.fi" to "nic.funet.fi". In this case the wildcard count
  310.     is 1, because only one word (tolsun) is replaced by a wildcard.
  311.     If the wildcard count would be 2, then the wildcard domain would
  312.     be "*.fi". Note that with wildcard name "*.fi" you could NOT
  313.     connect to "nic.funet.fi", because that would result in a server
  314.     name COLLISION (*.fi matches nic.funet.fi).
  315.  
  316.     I advice you to not to use wildcard servers before you know
  317.     for sure how they are used, they are mostly beneficial for
  318.     backbones of countries and other large areas with common domain.
  319.  
  320.  
  321.    2. MACHINE INFORMATION
  322.                             
  323.    IRC needs to know a few things about your UNIX site, and the "M" command
  324.    specifies this information for IRC.  The fomat of this command is:
  325.  
  326.            M:<YOUR Host NAME>:xxx:<Geographic Location>:<Internet Port>
  327.    Field:  1         2         3           4                 5
  328.  
  329.    Explanation:
  330.  
  331.       Field 1: "M" specifies a Machine description line
  332.  
  333.       Field 2: The name of YOUR host adding any Internet DOMAINNAME that 
  334.                might also be present.  
  335.  
  336.       Field 3: -- NOT USED --: Set to Value NULL (No spaces at ALL!).
  337.     
  338.       Field 4: Geographic Location is used to say WHERE YOUR SEVRER is,
  339.                and gives people in other parts of the world a good
  340.                idea of where you are!  If your server is in the USA, it is
  341.                usually best to say: <CITY> <STATE>, USA.  Like for Denver
  342.                I say: "Denver Colorado, USA".  Finnish sites (like
  343.                tolsun.oulu.fi generally say something like "Oulu, Finland".
  344.  
  345.       Field 5: The Internet port your server will use.  Should be set to
  346.            the same value as in the config.h file.
  347.  
  348.  
  349.       Example:
  350.                 M:tolsun.oulu.fi::Oulu, Finland:6667
  351.  
  352.                 This line reads: My Host's name is "tolsun.oulu.fi" and
  353.                 my site is located in "Oulu, Finland".  My ircd will use
  354.         Internet Port 6667.
  355.  
  356.  
  357.                 M:orion.cair.du.edu::Denver Colorado, USA:6667
  358.  
  359.                 This line reads: My Hosts name is "orion.cair.du.edu"
  360.                 and my site is located in "Denver Colorado, USA".
  361.             I have defined Internet Port number "6667" to be used
  362.                 as my IRCD Socket Port.
  363.  
  364.  
  365.    3. CLIENT CONNECTIONS -   How to let clients connect to your IRCD.
  366.  
  367.    A client is a program that connects to the ircd daemon (ircd).  Currently
  368.    there are clients written in C and in GNU Emacs Lisp.  The "irc"
  369.    program is the C client.  Each person that talks via IRC is running
  370.    their own client.
  371.  
  372.    The irc.conf files contains entries that specify which clients are allowed
  373.    to connect to your irc daemon.  Obviously you want to allow your cwn
  374.    machine's clients to connect.  You may want to allow clients from 
  375.    other sites to connect.  These remote clients will use your server
  376.    as a connection point.  All messages sent by these clients will pass
  377.    through your machine.
  378.  
  379.    The format of this entry in the conf file is:
  380.  
  381.           I:<TARGET Host Addr>:<Password>:<TARGET Hosts NAME>:<Internet Port>
  382.     Field:1         2               3             4                5
  383.  
  384.  
  385.       For example, if you were installing IRC on tolsun.oulu.fi and you wanted
  386.       to allow examples sake let us assume you were making this file for
  387.       tolsun and you wanted to let your own clients to connect to your
  388.       server, you would add this entry to the file:
  389.  
  390.       I:128.214.5.6::tolsun.oulu.fi
  391.       or
  392.       I:tolsun.oulu.fi::tolsun.oulu.fi
  393.  
  394.       If you wanted to let remote clients connect, you could add the
  395.       following lines:
  396.  
  397.       I:*.du.edu::*.du.edu
  398.  
  399.       Allow any clients from machines whose names end in "du.edu" to connect
  400.       with no password.
  401.  
  402.       I:128.214.6.100::nic.funet.fi
  403.  
  404.       Allow clients from a machine with that IP number and the name 
  405.       nic.funet.fi to connect.
  406.  
  407.       I:*.tut.fi:secret:*.tut.fi
  408.  
  409.       Allow clients from machines matching *.tut.fi to connect
  410.       with the password 'secret'.
  411.  
  412.       I:*::*
  413.  
  414.       Allow anyone from anywhere to connect your server.
  415.       This is the easiest way, but it also allows people to for example
  416.       dump files to your server, or connect 1000 (or how many open
  417.       sockets per process your OS allows) clients to your machine
  418.       and take your network ports. Of course the same things can be
  419.       done by simply telnetting to your machine's SMTP port (for example).
  420.  
  421.    NEW!!!
  422.       As of the 2.7.2d version of the server, the server is able to accept
  423.       connections on multiple ports. I-lines are required for each P-line
  424.       to allow connections to be accepted. For unix sockets, this means
  425.       either adding I:/path/port::/path/port or some variation (wildcards
  426.       are recognised here). For internet ports, there must be an I-line
  427.       which allows the host access as normal, but the port field of the
  428.       I-line must match that of the port of the socket accepting the
  429.       connectiion. A port number of 0 is a wildcard (matches all ports).
  430.  
  431.    4. DEFAULT HOSTS (for local clients)
  432.  
  433.       This defines the default connection for the irc client.  If you are
  434.       running an ircd server on the same machine, you will want to define
  435.       this command to connect to your own host.  If your site is not running
  436.       a server then this command should contain the TARGET host's connection
  437.       information and password (if any).  The format for this command is:
  438.  
  439.          U:<TARGET Host addr>:<Password>:<TARGET Host NAME>:<Internet Port>
  440.   Field: 1         2              3                4            5
  441.    
  442.  
  443.       For example:
  444.  
  445.            U:tolsun.oulu.fi::tolsun.oulu.fi:6667
  446.            U:128.214.5.6::tolsun.oulu.fi:6667
  447.            U:tolsun.oulu.fi::tolsun.oulu.fi
  448.  
  449.       If the port number is omitted, irc will default to using 6667.
  450.  
  451.   5. OPERATOR Privileges:  How to become the IRC administrator on your site
  452.  
  453.    To become an IRC Administrator, IRC must know who is authorized to become
  454.    an operator and what their "Nickname" and "Password" is.  To add this
  455.    information, EDIT your "irc.conf" file and add the following command
  456.    line to it:
  457.  
  458.           O:<TARGET Host NAME>:<password>:<nickname>:<port>:<class>
  459.   Field:  1          2             3          4        5       6
  460.  
  461.   Explanation:
  462.  
  463.      Field 1: Speficies Operator record. If you use capital letter ('O')
  464.               in it, it specifies a global operator. Small letter ('o')
  465.               specifies a local operator. Local operator has basically the
  466.               same rights except global operator with some restrictions.
  467.  
  468.      Field 2: Tells IRC which host you have the privileges FROM.  This
  469.               means that you should be logged into this host when you
  470.               ask for the priviliges.  If you specify "tolsun.oulu.fi"
  471.               then IRC will expect your CLIENT to be connected at 
  472.               "tolsun.oulu.fi" - when you ask for OPERATOR privileges
  473.               from "tolsun.oulu.fi".  You cannot be logged in at any
  474.               other host and be able to use your OPERATOR privileges
  475.               at tolsun, only when you are connected at TOLSUN will this
  476.               work - this is a safeguard against unauthorized sites.
  477.  
  478.  
  479.      Field 3: If your AUTHORIZATION Password - this is the password that 
  480.               let's IRC know you are who you say you are!  Never tell anyone
  481.               your password and always keep the "irc.conf" file protected
  482.               from all of the other users.
  483.  
  484.      Field 4: The Nickname you usually go by - but you can make this what
  485.               you want.  It is better to make this a NICKNAME that no one
  486.               else knows, but anything will do.  I usually use my own
  487.               loginname.
  488.  
  489.      Field 5: Unused.
  490.  
  491.      Field 6: The class field should refer to an existing class (preferably
  492.           having a lower number than that for the relevant I-line) and
  493.           determines the maximum number of simultaneous uses of the
  494.           O-line allowable through the max. links field in the Y-line.
  495.  
  496.   Example:
  497.               O:orion.cair.du.edu:pyunxc:Jeff
  498.  
  499.               There is an OPERATOR at "orion.cair.du.edu" that can get
  500.               Operator priviliges if he specifies a password of "pyunxc"
  501.               and uses a NICKNAME of "Jeff".
  502.  
  503.  
  504.  
  505.   6. ADMINISTRATIVE INFORMATION
  506.  
  507.   The "A" command is used for administrative information about a site.
  508.   The e-mail address of the person running the server should be included
  509.   here in case problems arise.
  510.  
  511.   
  512.             A:<Your Name/Location>:<Your Electronic Mailing Addr>:<other> 
  513.   Field:    1        2                    3                         4
  514.  
  515.   Explanation:
  516.  
  517.        Field 1: "A" specifies an Admin record.
  518.  
  519.  
  520.        Field 2: Use this field to say tell your FULL NAME and where in the 
  521.                 world your machine is.  Be sure to add your City, 
  522.         State/Province and Country.
  523.  
  524.  
  525.        Field 3: Use this field to specify your Electronic Mailing Address
  526.                 preferably your Internet Mailing Address.  If you have
  527.                 a UUCP or ARAPnet address - please add that as well.  Be
  528.                 sure to add any extra DOMAIN information that is needed,
  529.                 for example "mail jtrim@orion" probably won't work as a 
  530.                 mail address to me if you happen to be in Alaska.  But 
  531.                 "mail jtrim@orion.cair.du.edu" would work because you 
  532.                 know that "orion" is part of the DOMAIN "cair.du.edu". 
  533.                 So be sure to add your DOMAINNAMES to your mailing addresses.
  534.  
  535.        Field 4: Is really an OTHER field - you can add what you want here,
  536.                 
  537.  
  538.   Examples (the line is just one line in the confuration file, here it
  539.             is cut into two lines to make it clearer to read):
  540.  
  541. A:Jeff Trim -  Denver Colorado, USA:INET jtrim@orion.cair.du.edu UUCP {hao,
  542. isis}!udenva!jtrim:Terve! Heippa!  Have you said hello in Finnish today?;)
  543.  
  544.   Would look like this when printed out with the /admin command:
  545.  
  546.       Jeff Trim -  Denver Colorado, USA
  547.       INET jtrim@orion.cair.du.edu   UUCP {hao,isis}!udenva!jtrim
  548.       Terve! Hei! Heippa!  Have you said hello in Finnish today? ;)
  549.  
  550.  
  551.   Note that the A record cannot be split across multiple lines; it will 
  552.   typically be longer than 80 characters and will therefore wrap around
  553.   the screen.
  554.  
  555.  
  556.   7. REMOVING A USER FROM IRC  Remove an errant user from IRC on your site.
  557.  
  558.   Obviously it is hoped that you wouldn't have to use this command.
  559.   Unfortunately sometimes a user can become unmanageable and this is your
  560.   only recourse - the KILL USER command.  THIS COMMAND ONLY AFFECTS YOUR
  561.   SERVER - If this user can connect to another SERVER somewhere else in
  562.   the IRC-Network then you would have to talk to the administrator on that
  563.   site to disable his access from that IRCD Server as well.
  564.  
  565.   The format of this command is:
  566.  
  567.          K:<Host Name>:<time interval(s)>:<User>
  568.   Field: 1     2               3            4
  569.  
  570.   Explanation:
  571.  
  572.        Field 1:  "K" tells the IRCD that you are making a KILL USER command
  573.                  entry.
  574.  
  575.        Field 2:  In this field you specify the Hostname that the user is 
  576.                  connecting from.  If you wanted to REMOVE connects
  577.                  to IRC from "orion.cair.du.edu" then you would want to enter
  578.                  "orion.cair.du.edu".  If you want to REMOVE ALL HOSTS
  579.                  access you can use '*' (Wild Card notation) and no matter
  580.                  what host the USERNAME (specified in Field 4) connects from
  581.                  s/he will be denied access. Removing all hosts isn't
  582.                  very smart thing to do though, why would you run an ircd
  583.                  if you allow nobody to connect to it anyways ?
  584.  
  585.        Field 3:  Either leave this field empty (no spaces), then then lines
  586.          is active continuously for the specified user/host machine.
  587.          You may also specify intervals during the line should be
  588.          active, see examples above.
  589.     
  590.        Field 4:  The USERNAME of the user you want removed from IRC.  For
  591.                  example 'root'.
  592.  
  593.    
  594.    Some Examples:
  595.                    K:orion.cair.du.edu::jtrim
  596.  
  597.                If user 'jtrim' connects to IRC from host "orion.cair.du.edu"
  598.                then IMMEDIATELY REMOVE HIM from my IRCD.
  599.  
  600.                    K:*.cair.du.edu::root
  601.  
  602.                If user 'root' connects to IRC from any host that has the 
  603.                suffix "cair.du.edu" - then IMMEDIATELY REMOVE THEM from
  604.                my IRCD.
  605.  
  606.                    K:*::vijay
  607.  
  608.                This line reads "I don't care WHAT HOST user 'vijay' is on,
  609.                I will NEVER allow username 'vijay' to login to my IRCD.
  610.  
  611.                K:*.oulu.fi:0800-1200,1400-1900:*
  612.  
  613.            This disallows all users from hosts with enddomain 'oulu.fi'
  614.            access to your server between 8 and 12am, 2 and 7pm.
  615.            Users get kicked off if they're already signed on when the
  616.            line becomes active (they'll get a warning 5 minutes ago).
  617.  
  618.   8. Disallowing SERVERS in your irc net.
  619.  
  620.    In some cases people run into difficulties in net administration.
  621.    For one reason or another you do not want a certain server to be
  622.    in your net (for example because of the security holes it opens
  623.    for every server if it's not secured carefully). In that case
  624.    you should use Q-lines in your server. When you specify a server
  625.    name in Q-line, everytime some server link tries to introduce you
  626.    a server (remember, all server names are broadcast around the net),
  627.    that name is checked if it matches the Q-lines in your server.
  628.    If it matches, then your server disconnects the link. Note that
  629.    just placing Q-lines to your server probably results in your server
  630.    being left alone, unless other servers have agreed to have the
  631.    same Q-line in their ircd configuration files as well.
  632.  
  633.    Example:
  634.                 Q::of the security holes:foo.bar.baz
  635.  
  636.    This command excludes a server named "foo.bar.baz", the reason
  637.    is given to be security holes (you should give a reason, it is
  638.    polite). The first field is unused, so leave it empty.
  639.  
  640.  9. Connection Classes.
  641.  
  642.    To enable more efficient use of MAXIMUM_LINKS, connection classes
  643.    were implemented. To give a connection a class, add another field
  644.    (a sixth) to the C/N lines for a particular server.
  645.    Each line for a server should have the same number as the sixth
  646.    field.  If it is absent, the server deaults it to 0, using the
  647.    defaults from the config.h file.  To define a connection class,
  648.    you need to include a Y: line in the irc.conf file.  This enables
  649.    you to define the ping frequency, connection frequency and maximum
  650.    number of links that class should have.  Currently, the Y: line MUST
  651.    appear in the irc.conf file BEFORE it is used in any other way.
  652.  
  653.    The format for the line is:
  654.  
  655.        Y:<CLASS>:<PING FREQUENCY>:<CONNECT FREQUENCY>:<MAX LINKS>:<SENDQ>
  656. Field: 1    2                3                4                5     6
  657.  
  658.    Field 2:  This is the class number which gains the following attributes
  659.    and should match that which is on the end of the C/N line.
  660.  
  661.    Field 3:  This field defines how long the server will let the connection
  662.    remain "silent" before sending a PING message to make sure it is still
  663.    alive.  Unless you are sure of what you are doing, use the default value
  664.    which is in your config.h file.
  665.  
  666.    Field 4:  By changing this number, you change how often your server
  667.    checks to see if it can connect to this server.  If you want to check
  668.    very occasionally, use a large value, but if it is an important
  669.    connection, you might want a smaller value so that you connect to it
  670.    as soon as possible.
  671.  
  672.    Field 5:  This field defines the maximum number of links this class
  673.    will allow from automatic connections.  Using /CONNECT overrides this
  674.    feature.
  675.  
  676.    Field 6:  This field defines the 'sendq' value for this class.  If this
  677.    field is not present, the default (from config.h) is assigned.
  678.  
  679.    NOTE: leaving any of the fields out means their value is 0 (ZERO)!!
  680.  
  681.    example:
  682.  
  683.    Y:23:120:300:5
  684.  
  685.    define class 23 to allow 5 auto-connections, which are checked every
  686.    300 seconds.  The connection is allowed to remain silent for 120
  687.    seconds before a PING is sent.  NOTE: fields 3 & 4 are in seconds.
  688.  
  689.    You may also give I lines a class (again the sixth field to define
  690.    which class).  This is only usefull (currently) for redefining the
  691.    ping frequency.  It can also be useful as a diagnostic to see how
  692.    much each I line is used when combined with the TRACE output.
  693.  
  694.    Another feature of connection class is the ability to do automatic
  695.    routing by using the class as a 'priority'.  If you are connected
  696.    to a server which has a class lower than one of the servers that is
  697.    'behind' it, the server will disconnect the lower class one and
  698.    schedule a 'new' connection for the higher class server.
  699.  
  700.  10. Leaf Connections.
  701.  
  702.    To stop servers which should only act as leaves from hubs becoming
  703.    hubs accidently, the L line was introduced so that hubs can be aware
  704.    of which servers should and shouldnt be treated as leaves. A leaf
  705.    server is supposed to remain a node for the entirity of its life
  706.    whilst connected to the IRC server network.  It is quite easy, however
  707.    for a leaf server to be incorrectly setup and create problems by
  708.    becoming a node of 2 or more servers, ending its life as a leaf. The
  709.    L line enables the administrator of an IRC 'Hub server' to 'stop' a
  710.    server which is meant to act as a leaf trying to make itself a hub.
  711.    If, for example, the leaf server connects to another server which doesnt
  712.    have an L-line for it, the one which does will drop the connection, once
  713.    again making the server a leaf.
  714.  
  715.        L:<SERVER MASK>:*:<SERVER NAME>:<MAX DEPTH>
  716. Field: 1       2       3       4            5
  717.  
  718.    Field 2 is a mask of which servers the leaf-like attributes are used on
  719.    when the server receives SERVER messages.  The wildcards * and ? may be
  720.    used within this field for matching purposes.  If this field is empty,
  721.    it acts the same as if it were a single * (ie matches everything).
  722.  
  723.    Field 4 is the the server connectted to you that for which you want to
  724.    enforce leaf-like attributes upon.
  725.  
  726.    Field 5 is the maximum depth allowed on that leaf and if not specified,
  727.    a value of 1 is assumed.  The depth is checked each time a SERVER message
  728.    is received by the server, the hops to the server being the field checked
  729.    against this max depth and if greater, the connection to the server that
  730.    made its leaf too deep has its connection dropped.
  731.    For the L-line to come into effect, both fields, 2 and 4, must match up
  732.    with the new server being introduced and the server which is responsible
  733.    for introducing this new server.
  734.  
  735.  11. Service Connections (Not yet implemented)
  736.  
  737.   Introduction.
  738.    The Service is a special kind of IRC client. It does not have the full
  739.    abilities of a normal user but can behave in a more active manner than
  740.    a normal client. Services as they stand now are not fully implemented.
  741.    The following line can be added to your ircd.conf file to enable a
  742.    service:
  743.   
  744.           S:<TARGET Host Mask>:<password>:<service_name>
  745.   Field:  1          2             3          4
  746.  
  747.   Explanation:
  748.  
  749.     Field 2:
  750.     The host mask should be set to match the hosts(s) from which the
  751.     service will be connecting from. This may be either an IP# or full
  752.     name (prefered).
  753.  
  754.    Field 3:
  755.     This is the password which must be passed in the SERVICE command.
  756.  
  757.    Field 4:
  758.     The 'service name' is only used for the purpose of finding the
  759.     right S-line from the ircd.conf file for password matching. The
  760.     actual service name used is that set by NICK commands prior to
  761.     SERVICE being sent.
  762.  
  763.    To connect a service to your server, you must first create an S-line
  764.    entry in your ircd.conf file and get your server to read this in (ie
  765.    rehash or reboot). Once your server has updated itself, you can then
  766.    attempt to register your connection as a service.
  767.    Registering as a service is similar to registering as a normal user
  768.    except that you must send NICK first and then SERVICE. The service
  769.    command should look something like this:
  770.  
  771.     SERVICE secretpassword referencename :Service information
  772.  
  773.    A successfull registering of a service at the server will result in
  774.    a RPL_YOURESERVICE (383) being sent back to you. Any other reply as
  775.    a result of sending service indicates an error has occured.
  776.  
  777.    A service is not a very useful sort of client, it cannot join channels
  778.    or issue certain commands although most are available to it. Services,
  779.    however, are not affected by flood control. It is therefore wise to
  780.    oversee the use of S-lines with some care.
  781.  
  782.  12. Port Connections
  783.  
  784.   Introduction.
  785.    The port line adds flexibility to the server's ability to accept
  786.    connections. By use of this line in the ircd.conf file, it is easy
  787.    to setup both Unix Domain ports for the server to accept connections
  788.    on as well as extra internet ports.
  789.  
  790.        P:<Internet IP# Mask>:<*>:<*>:<PORT>
  791. Field: 1        2             3   4     5
  792.  
  793. or
  794.  
  795.        P:<Directory>:<*>:<*>:<PORT>
  796. Field: 1        2             3   4     5
  797.  
  798.   Explanation
  799.    Internet Ports
  800.     Field 1
  801.     The internet IP mask defines where connections may come from and
  802.     be accepted. The IP mask uses either *'s or 0's as wildcards. The
  803.     following two lines are the same:
  804.  
  805.         P:128.2.*:::6664
  806.         P:128.2.0.0:::6664
  807.  
  808.     The incoming isnt matched against the mask, rather the ip# string
  809.     is decoded and compared segment by segment. Thus
  810.         P:128.2*.1.2:::6664
  811.     will not match 128.20.1.2.
  812.  
  813.      Field 5
  814.     The port number field tells the server which port number it should
  815.     listen on for incoming connections.
  816.  
  817.     Unix Socket Ports.
  818.      Field 1
  819.     The path set in field 1 should be the directory name in which to
  820.     create the unix socket for later listening to. The server will
  821.     attempt to create the directory before creating the unix socket.
  822.  
  823.      Field 5
  824.     The port field when used in combination with a pathname in a P-line
  825.     is the filename created in the directory set in Field 1.
  826.  
  827.      Example:
  828.         P:/tmp/.ircd:::6667
  829.  
  830.     Creates a unix socket in the /tmp/.ircd directory called "6667".
  831.     The unix socket (file) must be a numerical.
  832.  
  833. 13.  Hub Connections
  834.  
  835.       In direct contrast to L-lines, the server also implements H-lines to
  836.    determine which servers may act as a hub and what they may 'hub for'.
  837.    If a server is only going to supply its own name (ie act as a solitary
  838.    leaf) then no H-line is required for, else a H-line must be added as
  839.    follows:
  840.  
  841.        H:<SERVER MASK>:*:<SERVER NAME>
  842. Field: 1       2       3       4
  843.  
  844.    Explanation:
  845.     Field 2
  846.       All servers that are allowed via this H-line must match the mask
  847.       given in this field.
  848.  
  849.     Field 4
  850.       This field is used to match exactly against a server name, wildcards
  851.       being treated as literal characters.
  852.  
  853.    Examples:
  854.  
  855.         H:*.edu:*:*.bu.edu
  856.  
  857.     Allows a server named "*.bu.edu" to introduce only servers that
  858.      match the "*.edu" name mask.
  859.  
  860.         H:*:*:eff.org
  861.  
  862.     Allow "eff.org" to introduce (and act as a hub for) any server.
  863.  
  864.    Note:  It is possible to have and use multiple H-lines (or L-lines) for
  865.       the one server.  eg:
  866.  
  867.         H:*.edu:*:*.bu.edu
  868.         H:*.au:*:*.bu.edu
  869.  
  870.        is allowed as is
  871.  
  872.         L:*.edu:*:*.au
  873.         L:*.com:*:*.au
  874.  
  875.  
  876. Appendix A: Difference between IP addresses and hostnames
  877.  
  878.  
  879.    There are 2 different types of INTERNET addresses, NAME addresses and
  880.    NUMERIC addresses.  NAME addresses look like ENGLISH words (and indeed
  881.    they are ENGLISH words that refer to a given host).  A NAME address looks
  882.    like "tolsun.oulu.fi" - and that particular address refers to the machine 
  883.    named TOLSUN in Finland.  It is a UNIQUE address because no other machine
  884.    in the world has its NAME address the same as "tolsun.oulu.fi".  Anytime
  885.    you say "telnet tolsun.oulu.fi" - you would always connect to TOLSUN in
  886.    Finland.  NUMERIC addresses refer to those addresses that are made up of
  887.    NUMBERS for example "128.214.5.6" is the NUMERIC address for TOLSUN.  This
  888.    address is also UNIQUE in that no other machine in the world will be use 
  889.    those NUMERIC numbers.  The NUMERIC address is usually more reliable than
  890.    the NAME address because not all sites can recognize and translate the
  891.    NAME address into it's numeric counterpart.  NUMERIC always seems to work
  892.    best, but use a NAME address when you can because it is easier to tell
  893.    what host you are connected to.
  894.  
  895.  
  896.    Every Unix machine has a file called "/etc/hosts" on it.  This file 
  897.    contains NAME and NUMERIC addresses.  When you supply IRC with a NAME 
  898.    address it will at first try to find it in /etc/hosts, and then (if it's 
  899.    really smart), use the local Domain Name Server (DNS) to find the NUMERIC
  900.    address for the host you want to connect to.  Thus if you plan to use NAME
  901.    addresses keep in mind that on SOME sites the entry for the TARGET machine
  902.    must be found in /etc/hosts or the NAME address will fail.  A typical 
  903.    entry in /etc/hosts looks like this:
  904.  
  905.    130.253.1.15    orion.cair.du.edu orion.du.edu orion    # BSD 4.3
  906.  
  907.    This particular example is the Host ORION at the University of Denver. 
  908.    Notice that on the far left is the NUMERIC Address for orion.  The
  909.    next few ENGLISH words are the NAME addresses that can be used for orion,
  910.    "orion.cair.du.edu", "orion.du.edu", "orion".  ALL of these NAME addresses
  911.    will return the NUMERIC address "130.253.1.15" which IRC will use to
  912.    connect to the TARGET UNIX. (when I say TARGET UNIX I am refering to the
  913.    UNIX you want to connect to for IRC). Any futher questions about
  914.    /etc/hosts should be directed to "man hosts".
  915.  
  916.  
  917. Appendix B: Enabling Summon Messages
  918.  
  919.    +-----------------------------------------------------------------------+
  920.    |            E N A B L I N G    / S U M M O N    M E S S A G E S        |
  921.    +-----------------------------------------------------------------------+
  922.  
  923.    *NOTE* You must have ROOT or special access to the GROUP tty ('/dev')
  924.    to do this. If you want to allow users around the world to summon
  925.    users at your site to irc, then you should make sure that summon works.
  926.  
  927.    The "IRCD" program needs access to the GROUP of '/dev'.   This
  928.    directory is where user TTY's are stored (as UNIX treats each Terminal
  929.    as a FILE!)   IRCD needs GROUP ACCESS to /dev so that users can be
  930.    SUMMONED to the program by others users that are *in* the program.
  931.    This allows people from other Universities around the world to SUMMON
  932.    your users to IRC so that they can chat with them.  Berkeley, SUN, HP-UX
  933.    and most of the newer versions of UNIX check to see if a USER is
  934.    accepting MESSAGES via the GROUP access rights on their TTY listing
  935.    in the /dev directory. For example an entry in '/dev' looks like this:
  936.  
  937.   (Unix Path on BSD 4.3 UNIX is:  /dev/ttyp0)
  938.  
  939.         crw------- 1 jtrim     20,     0 Apr 29 10:35 ttyp0
  940.  
  941.    You will note that 'jtrim' OWNS this terminal and can READ/WRITE to this
  942.    terminal as well (which makes sense because I am ENTERING DATA and
  943.    RECEIVEING DATA back from the UNIX).  I logged into this particular
  944.    UNIX on "April 29th" at "10:35am" and my TTY is "ttyp0".  But further
  945.    of *note* is that I do not have my MESSAGES ON! (mesg n)  -- This is
  946.    how my terminal would look with MESSAGES ON (mesg y):
  947.  
  948.         crw--w---- 1 jtrim     20,     0 Apr 29 10:35 ttyp0
  949.  
  950.    With my MESSAGES ON (mesg y) I can receive TALK(1) requests, use the 
  951.    UNIX WRITE(1) command and other commands that allow users to talk
  952.    to one another.  In IRC this would also allow me to get IRC /SUMMON
  953.    messages.  To set up the "IRCD" program to work with /SUMMON type
  954.    the following:  (using ROOT or an account that has access to '/dev').
  955.  
  956.        % chgrp tty ircd
  957.        % chmod 6111 ircd 
  958.  
  959.    The above commands read: "Give IRCD access to GROUP tty (which is /dev)
  960.    and then when ANYONE runs the IRCD allow SETUID and SETGID priviliges
  961.    so that they can use the /SUMMON command.
  962.