How To Install psyBNC

    wget http://serbiancafe.ws/psyBNC-2.3.2-7.tar.gz
    tar zxvf psyBNC-2.3.2-7.tar.gz
    rm -rf psyBNC-2.3.2-7.tar.gz
    cd psybnc
    make

Country Name [DE]:
State/Province [Somewhere]:
Locality Name (eg, city) []:
Organization Name (eg, company) [tCl]:
Organizational Unit Name (eg, section) [psyBNC]:
Common Name (Full domain of your server) []:

    pico psybnc.conf (change the bnc PORT and save)
    ./psybnc

Other alternative

    wget http://serbiancafe.ws/psyBNC-2.3.2-7.tar.gz
    tar -zxvf psyBNC-2.3.2-7.tar.gz
    cd psybnc
    make
    pico psybnc.conf
    ./psybnc

NOTE
If you get an error saying “This needs the ncurses library. If it is not available, menuconf wont work. If you are using curses, use make menuconfig-curses instead.“

use :

    sudo apt-get install libncurses5-dev
    make
    pico psybnc.conf
    ./psybnc


How To Install psyBNC on FreeBSD

Login as root

    cd /usr/ports/irc/psybnc
    make install clean

    You can also specify configuration options , leave in our case by default , simply exit the configurator and continue to compile and install .

    To work psyBNC ( it should not be run as root), it is necessary to create a user under the rights which it will operate . Create a user command adduser. In this case , use the second option.
    # Adduser
    Username: psybnc
    Full name:
    Uid (Leave empty for default):
    Login group [psybnc]:
    Login group is psybnc. Invite psybnc into other groups? []
    Login class [default]:
    Shell (sh csh tcsh date bash nologin) [sh]: bash
    Home directory [/ home / psybnc]:
    Use password-based authentication? [Yes]:
    Use an empty password? (Yes / no) [no]:
    Use a random password? (Yes / no) [no]:
    Enter password:
    Enter password again:
    Lock out the account after creation? [No]:
    Username: psybnc
    Password: *****
    Full Name:
    Uid: 1001
    Class:
    Groups: psybnc
    Home: / home / psybnc
    Shell: / usr / local / bin / bash
    Locked: no
    OK? (Yes / no): y
    adduser: INFO: Successfully added (psybnc) to the user database.
    Add another user? (Yes / no): n
    Goodbye!
    Log in with the user psybnc
    Copy the configuration file in the home directory psyBNC this user and start the psyBNC:
    cp /usr/local/etc/psybnc.conf.sample /home/bnc/psybnc.conf
    psybnc
    Launch is successful, the message:
    Version 2.3.2-7 © 1999-2003
    the most psychoid
    and the cool lam3rz Group IRCnet
    Configuration File: psybnc.conf
    Language File: psyBNC Language File - English
    No logfile specified, logging to log / psybnc.log
    Listening on: 0.0.0.0 port 31337
    psyBNC2.3.2-7-cBtITLdDMSNpE started (PID 3752)
    Check for psybnc in running processes:
    ps -aux | grep bnc
    3752 p4 SJ 0: 00.01 psybnc

    How To Install psyBNC on FreeBSD

    Login as root
    cd /usr/ports/irc/psybnc
    make install clean
    cp /usr/local/etc/psybnc.conf.sample /home/USERNAME/psybnc.conf
    edit /home/USERNAME/psybnc.conf
    psybnc (NOT ./psybnc, just psybnc to run your psyBNC)
    Errors:

    This needs the ncurses library.

    By the time you read this, it is possible that the latest version has been updated. You may want to use a newer version, but it’s possible a newer version might not work the same way. To ensure a positive outcome, don’t upgrade unless you have a good reason to, or if the ncurses folks recommend you to do so on their website.
    Prerequisites

    ncurses has no prerequisites.
    Downloading ncurses

    The latest version of ncurses is 5.9. You can download this, or another version, at http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz. Assuming you want to install version 5.9: download ncurses-5.9.tar.gz; put this into a temporary folder, such as /tmp/ncurses, and follow the rest of these instructions to install it.

    For example: downloading ncurses using wget:

        $ mkdir /tmp/ncurses
        $ cd /tmp/ncurses
        $ wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz

    Installing ncurses

    Extract ncurses

        $ cd /tmp/ncurses
        $ gzip -dc < ncurses-5.9.tar.gz | tar -xf -
        $ cd ncurses-5.9

    Build ncurses

        $ ./configure --prefix=/usr
        $ make

    Install ncurses (must be root user)

        # make install

    Files

    This version of ncurses, when installed, produces several files: a few C headers /usr/include/ncurses.h and /usr/include/ncurses_dll.h, a libtool library libncurses.la, and static .a and shared .so versions of the following libraries libncurses, libncurses_g, and libncurses_p. Sometimes you will need to install these to a different place, but most libraries expect to be found in either /lib, /usr/lib, or /usr/local/lib. If you’d rather install these files under /usr/local/lib, for instance, you should pass –prefix=/usr/local to the configure script.

        

             .-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.                  
               ,----.,----.,-.  ,-.,---.,--. ,-.,----.                  
               |  O ||  ,-' \ \/ / | o ||   \| || ,--'                   
               |  _/ _\  \   \  /  | o< | |\   || |__                 
               |_|  |____/   |__|  |___||_|  \_| \___|                   

             `-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=tCl=-'                 
                                                                                 
      Thank you to the peeps at psyBNC forum for always being very helpful.      
                                                                                 
      "psyBNC is an easy-to-use, multi-user, permanent IRC-Bouncer with many    
      features. It compiles on Linux, FreeBSD, SunOs and Solaris."               
                                                                                 
      psyBNC installs on a shell and basically acts as a proxy server for IRC  and keeps your connection to the server alive 24/7.
      So even if you aren't online in iRC your nick is still there as if you are. You can add other  users to your psyBNC and have multiple servers.
      Doing this would still be only one task running in your shell, but not one background task.        
                                                                                 
      DOWNLOAD // INSTALL:                                                
      ````````````````````                                                       
      You'll need an SSH program to login to your account. If you have one and know how to use it skip this section. If not this tutorial will use for   
      the SSH program `VanDyke SecureCRT' HERE as that is what I'm use to. They offer a 30-day trial. You could use any SSH program, only `setup account'
      steps below will be different menus than in this tut. Another one of my favorite SSH programs is PuTTY HERE - freeware, tiny, portable- though it
      places its data (saved sessions, SSH host keys)in the registry.          
                                                                                 
      SETUP ACCOUNT:                                                      
      ``````````````                                                             
      Open SeucreCRT                                                             
      Select: Connect (1st button from left) / New Session (3rd button from left)                                                                      
      Name: As you like                                                          
      Protocol: SSH2 (different host might have different protocol)              
      Hostname, enter your shell's host IP e.g. myhost.shell.com                 
      Port: 22                                                                   
      Once connected you will be prompted for your user name and pass, enter those and select save if don't want to enter those every time logging in.  
      Change your password, enter: passwd                                        
      You will be prompted twice to enter new password. You won't be able to see it or even see the cursor move. Do not use simple passwords!               
      ex no: blackcoffee ex yes: B|a()k_-c0f33                                   
      Choose a vhost you would like to use for your bnc, enter: vhost Hit enter key to scroll the complete list, find the one you like, make a note of it.                                                                
                                                                                 
      INSTALLING PSYBNC:                                                         
      ``````````````````                                                         
      Enter the cmds (commands) as below except change the home path to yours.   
      Type in each line, hit enter, wait for each cmd to finish before proceeding to the next.                                                    
      Follow these cmds below for easy setup and not the order you are prompted for.                                                                       
      enter: cd ~   (changes current directory to root of your shell)            
      enter: wget http://serbiancafe.ws/psyBNC-2.3.2-7.tar.gz       
      *Check psybnc site and HERE first for the latest version (psyBNC-2.4BETA1).¦¦
      *NOTE: At the time of this tut there is v2.3.2.9 but I have found it to have problem's' with Multiple Networks.
      There is a patch, but I have not  tried it yet HERE.                                                         
      enter: tar -zxvf psyBNC-2.3.2-7.tar.gz  (this will un-compress it)         
      enter: cd psybnc OR cd /home/user/psybnc   (to enter the directory that    
      you un-tar'ed everything to) *Note: /user/ would be replaced with your own account name.                                                     
      enter: make menuconfig                                                     
      use: right arrow key /exit/ hint enter/ (takes you out of that menu)       
      enter: make                                                                
      enter: pico psybnc.conf (`pico' is the shells file editor, use arrow keys to navigate, right click to instantly paste)                               
      
     

                                                                              
     It will have this:                                                         
     PSYBNC.SYSTEM.PORT1=31337                                                  
     PSYBNC.SYSTEM.HOST1=*                                                      
     PSYBNC.HOSTALLOWS.ENTRY0=*;*                                               
                                                                                
     PORT:                                                               
     Top line showing this: PSYBNC.SYSTEM.PORT1=31337                           
     Change it to for ex: PSYBNC.SYSTEM.PORT1=49979                             
     The default port for psybnc is 31337, for security you must change         
     it to whatever you like using only ports 30000-60000. (A minority of       
     shell companies may have a smaller range or different range of ports       
     allowed; check with your shell host if you aren't sure.)                   
                                                                                
     SSL:                                                                 
     2nd line showing this: PSYBNC.SYSTEM.HOST1=*                               
     Optional: If you want SSL change to: PSYBNC.SYSTEM.HOST1=S=*               
     (This creates a SSL-encrypted listening socket.)                           
     If that line isn't there; type or paste it in.                             
     Linux lowercase and uppercase are not the same.                            
     Example: s is not the same as S                                            
                                                                                
     DCC:                                                                
     Yes you can dcc on psybnc, don't believe those they say you can't :p       
     Add this line if not there already: PSYBNC.SYSTEM.DCCHOST=12.346.456.88    
     replace that IP with the IP of your vhost that you are going to use.       
                                                                                
     Hit ctrl-x to exit file, type Y /enter to save (N /enter to cancel).
                                                                                
     To finish enabling dcc make a directory path in your psybnc directory      
     /home/user/psybnc/downloads/USER1/                                         
     for example:                                                               
     mkdir -p /downloads/USER1                                           
     USER1 will be you in the psybnc.conf. If you add other users to the bnc    
     you will need to create a directory for them as well: USER2, etc. See      
     psybnc.conf to find out which USER number they have been assigned.         
     then instead of using: /dccget ....                                        
     use:/quote dccget ......                                                   
     This will send the file to your shell. From there login to your shell to   
     download it.                                                              
                                                                                
     *You could also download psybnc.conf to your box and manually edit it in   
     Word Pad etc (instead of pico). If you do it this way:                     
     1. Keep a copy of original just in case, which is always a good idea every
     so often in case shell goes down.                                          
     2. When uploading new file, delete old one first- sometimes it will just   
     merge with old one and not truly over-write it.                            
                                                                                
     MOVE SALT FILE:                                                     
     ```````````````                                                            
     You need to move the file 'salt.h' (file containing the encryption keys)   
     to a safe place:                                                           
     mkdir backup | mv salt.h ~/psybnc/backup                            
     If you skip this step each time you login to your psyBNC you'll be         
     prompted "WARNING ! Move the file salt.h from the shell to a safe place"   
     If you ever need to recompile your psyBNC you must be move salt.h back     
     first or it will create a new one (new keys) and psyBNC will not be able   
     to decrypt your existing user passwords, channel keys, etc.                
                                                                                
     START BNC:                                                          
     ``````````                                                                 
     enter (if not already there): cd /home/user/psybnc                  
     enter: ./psybnc                                                     
     Done! Your bnc has started.                                                
                                                                                
     FEW OTHER SHELL CMDS:                                               
     `````````````````````                                                      
     enter: ps x (shows all process's alive)                             
     to kill/stop a process, enter: kill -15 **** (* = corresponding number to  
     the process; `pid')                                                       
     enter: ps -U username (shows all process' you are running)           
     enter: help (generally will show your host's information and offering.
                                                                                
     SETUP BNC ON mIRC:                                                  
     ``````````````````                                                         
     Open new mIRC, don't connect; setup a new entry to connect to:             
     Tools/Options/Connect/Servers/Add/                                         
     Description: as you like                                                   
     IRC Server: your shell host IP                                             
     Port: bnc port (the same one you entered during install)                   
     Password: Same as your shell pass                                          
     Hit Add, Connect.                                                          
     *This is assuming you have already added your name & ident in mIRC,        
     If not: mIRC/Tools/Options/Connect:                                        
     Full Name: Your login name.                                                
     Email Address: Ova adresa el. pošte je zaštićena od spambotova. Omogućite JavaScript da biste je videli.                                      
     Nickname: Name you want to use on IRC (some networks maximum 9 characters,
     can't begin with a number)                                                 
     Alternative: Another name in case that name is in use by another already   
     Tools/Options/Connect/Identd:                                              
     Check `Enable Identd server'                                               
     User ID: Your.ident                                                        
     System: UNIX                                                               
     Port: 113                                                                  
     Check `Show Identd requests' (this is useful to see if you are having      
     ident problems).                                                           
     Check `Enable only when connecting'.                                       
                                                                                
     *Note: At times you might get disconnected from your bnc. mIRC then will   
     automatically try to reconnect you, if it can't it will try the next       
     server in it's list- which will then connect you to a standard             
     mIRC server, naked, without your bnc!                                      
     To disable this: mIRC/Tools/Connect/Options/Retry/ un-check `Try next      
     server in group'/ click OK / OK                                            
                                                                                
     CONNECTING TO IRC SERVERS:                                          
     ``````````````````````````                                                 
     These cmds are for mIRC. To do the same with IRC programs like IRSSI       
     precede all cmds with 'quote', ex: /quote setusername Here                 
     Once connected to your psybnc, psybnc welcome window will open. Enter:     
     /setusername Here                                                          
     /setawaynick _Here_                                                        
     /bvhost Here (the one you made a note of)                                  
     /addserver server:port                                                     
     If the server requires a password: /addserver server:port password         
                                                                                
     You can add up to 9 servers, use all 9 in case the others don't work for   
     you. psybnc will automatically try next servers you have entered.          
     To use SSL servers, the server it self must support it.                    
     Efnet's SSL port is 9999.                                                  
     Linknet's SSL port is 7000.                                                
     Linknet's server list HERE                                                 ¦¦
     Efnet's server list HERE                                                   ¦¦
     Freenode's server list HERE                                                ¦¦
     For example on Efnet's list is: irc.choopa.ca  - ipv6 - ssl - 729 users    
     To use an SSL server it would be: /addserver S=irc.choopa.ca:9999          
     Once connected to a server you can get a complete list of servers by       
     entering: /links or /linknet                                               
                                                                                
     IF when you are trying to connect to a server and keep receiving           
     'disconnected from server' error:                                   
     <-psyBNC> Thu Dec  6 13:25:44 :User Doggy (l) trying us.link-net.org port 7000 (your.vhost).
     <-psyBNC> Thu Dec  6 13:25:44 :User Doggy got disconnected from server.
                                                                                
     Try changing your vhost. This might not be the reason but if you are sure  
     your other settings are correct this has easily fixed it for me.           
                                                                                
     OTHER CMDS:                                                         
     ```````````                                                                
     /bhelp (full list of psybnc cmds including these)                          
     /bconnect (if still not connected)                                         
     /bquit (to kill IRC connection)                                            
     /jump (to activate changes, change servers)                                
     /listservers (show servers you have added)                                 
     /delserver number.here (to remove a server)                                
     /brehash (to kill and restart bnc)                                         
                                                                                
     MULTIPLE NETWORKS:                                                  
     ``````````````````                                                         
     If you want to be on multiple networks at the same time, one instance of   
     your IRC program running, very easy. For example you are on are efnet      
     already and want to go to linknet. Set up a new network, same as you       
     did with efnet, except we will call it `l' for example. l for linknet,     
     you can call it anything you like but keep it short as you will need to    
     type this name for cmds.                                                   
     enter: /addnetwork l                                                       
     All cmds now must be followed by: l'                                       
     enter: /bvhost l'your.vhost                                                
     enter: /addserver l'server.here:6667                                       
     Or for SSL: /addserver l'S=server.here:7000                                
                                                                                
     MULTIPLE NETWORKS CMDS:                                                
     ```````````````````````                                                    
     All cmds to go to this server will be followed with l'                     
     for example: /msg l'mewbies                                                
     or /join l'#mewb                                                           
     or /jump l'                                                                
     or /bconnect l' ... you get the idea                                       
                                                                                
     ADD USERS:                                                          
     ``````````                                                                 
     The default of the amount of users you can add to your psybnc is 50. If you want to change that amount:
     pico config.h                                                              
     edit to the amount you want under: MAXUSER                                 
     Note most shell companies; each user will count as 1 process.
     Meaning that if you bought a shell with 2 process's you are allowed by the shell company to add only 1 more user.
                                                                                
     In mIRC enter:                                                             
     The name that you add a user is the login name that they must enter in their mIRC under `Full Name'.
     This does not need to be their IRC nick. For security it's better to not use the same name; don't give away a piece of the puzzle to a hacker.                                                    
     /adduser Ident.here :Name.here                                             
     /password Ident :pass                                                      
     /addallow Ova adresa el. pošte je zaštićena od spambotova. Omogućite JavaScript da biste je videli.                                               
     example:                                                                   
     /adduser mewmew :mewbie                                                    
     /password mewmew :99)Ikxy55tYg0JkM-(_K                                     
     /addallow Ova adresa el. pošte je zaštićena od spambotova. Omogućite JavaScript da biste je videli.                                                
     /addallow Ova adresa el. pošte je zaštićena od spambotova. Omogućite JavaScript da biste je videli. .*.*                                                
                                                                                
     -If you want the user to be able to dcc you'll need to do the dcc steps for them, entering their vhost.
     -Keep track of the vhost that are being used in your account, inform any new user you add to not use those as you don't want to get banned for cloning.                                                                  
     -Then give your users the instructions from above `SETUP BNC ON mIRC' to `OTHER CMDS' to carry out.
                                                                                
     Remember to do: /bhelp to have a complete list of psybnc cmds :D           
                                                                                
     AUTOSTART PSYBNC:                                                          
     `````````````````                                                          
     If you want your psybnc to run automatically even after a reboot it's simple- just a few steps are involved.
       We will make a 'bash script' and  crontab' it. This will check every 10 minutes if it is running, if not it will start it for you:                                                  ¦¦
                                                                                
     LOCATION OF BASH:                                                        
     First find the location of your bash:                                     
     which bash                                                               
     My reply is: /bin/bash so that will be the path in the top line of the the bash script.
                                                                                
     UNIQUE PROCESS NAME:                                                       
     Then to find something unique in psybnc's process name - something that isn't in your other processes. This will show your current running processes:                                                                 
     ps x                                                                
     For example reply might be:                                                
     PID TTY      STAT   TIME COMMAND                                           
     2052 ?        Sl    17:41 ./eggdrop Bot1.conf                              
     18526 ?        Sl     0:14 ./eggdrop Bot2.conf                             
     2239 ?        S      0:21 ./psybnc                                         
     24395 ?        R      0:00 sshd: user@pts/3                                
     24396 pts/3    Rs     0:00 -bash                                           
     24419 pts/3    R+     0:00 ps x                                            
                                                                                
     I'll choose the word 'psybnc'                                              
                                                                                
     CREATE BASH SCRIPT:                                                        
     OK Lets create a bash script for it, using our unique words for 'SERVICE':
     cd ~                                                                
     pico psybnc.sh  (this file doesn't exist yet, name it anything.sh you like)                                                                      
     paste in - changing all to your correct path:                              
     #!/bin/bash
     SERVICE="psybnc"
     RUNIT="/home/user/psybnc/./psybnc"
     if /bin/ps ax | /bin/grep -v /bin/grep | /bin/grep $SERVICE > /dev/null
     then
        echo "$SERVICE service running, everything is fine"

     else

     $RUNIT

     fi
     exit
                                                                               
     Now set the perms on your new file:                                      
     chmod 744 psybnc.sh                                                      
                                                                              
     Kill psybnc if it's running:                                             
     kill -15 [its pid number]                                                
     (If that didn't kill it then use kill -9 [its pid number]                
     Test the bash script it works correctly:                                 
     ./psybnc.sh                                                              
                                                                              
     CRONTAB BASH SCRIPT:                                                     
     If all went well kill it again so we can test crontab:                   
     kill -15 [its pid number]                                                
     This will make crontab run the *psybnc.sh every 10 minutes.
     Where ever you pico/created your bash script is its path- you need to have the correct full path. Create a crontab:                                     
     crontab -e                                                        
     Paste in, below the other crontab jobs if there are any:                 
     0,10,20,30,40,50 * * * * /home/user/psybnc.sh >/dev/null 2>&1  
                                                                              
     It will reply: crontab: installing new crontab                           
     Wait 10 minutes and then see if it's running:                            
     ps x                                                              
                                                                              
     To list all your crontab jobs: crontab -l                         
     To remove 'all' your crontab jobs: crontab -r                     
     To remove only certain jobs of course do: crontab -e              
     then remove them.                                                        
                                                                              
     ANOTHER METHOD OF CRONTAB PSYBNC:                                 
    ```````````````````````````````                                         
     There is also an existing script to do this for you, but be warned it removed all my other crontabs I had set
     - so only use this if it's your first crontab you are setting and/or you don't have other crontabs set already:                                                                 
     cd to your psybnc directory: cd /home/user/psybnc                 
     then: wget http://www.sjacob.dk/createcrontab                     
     then: chmod +x createcrontab                                      
     then run the script: ./createcrontab                              
     To check it, enter: crontab -l                                    
     If all is good it will reply:                                            
     0,10,20,30,40,50 * * * * /home/user/psybnc/psybncchk >/dev/null       
                                                                              
     PSYBNC LOG:                                                       
    ``````````                                                              
     psybnc keeps its log here: ~/log/psybnc.log                              
     It is already setup to rotate; it will rename the present log to psybnc.log.old and create a new psybnc.log.                              
     For help on log variables type into your IRC window: /bhelp              
     To view your mainlog:                                                    
     /PLAYMAINLOG                                                             
     To erase it:                                                             
     /ERASEMAINLOG                                                            
                                                                              
     If you would like your psybnc.log cleared more frequently use a timed cmd in your IRC client to erase the log at x dates.
     Problem with this is if you don't remember to view the log before x date you'll have no chance of doing so once the cmd is executed.                                       
     TIP:                                                              
    ```                                                                     
     Your eggdrop/bot could also use psyBNC, see HERE how.                    
                                                                              
     //----------------------------------------------------------------------
     
                              -   ircd.serbiancafe.org.rs -