Table of Contents

Overview

irc.offbyone.lan is the LAIR IRC server.

hostname RAM disk swap OS Kernel
irc.offbyone.lan 256MB 4GB (/) 128MB Debian 8.0 “Jessie” (AMD64) 3.14-1-amd64

lab46.offbyone.lan created on sokraits on 07/11/2014.

News

TODO

Network Configuration

Machine Interface IP Address MAC Address Other Names
irc.offbyone.lan eth0 10.80.2.12 00:16:3e:5d:88:d7 irc.lair.lan

Packages

The following packages have been installed on irc:

Xen Configuration

irc is a Xen virtual machine. Pertinent configuration information follows:

Configuration

The Xen config file for this VM is as follows:

irc.cfg
######################################################################
##
## LAIR Xen VM configuration file
##
##     created by xen-tools 4.4 on Fri Jul 11 10:57:30 2014.
##
######################################################################
 
######################################################################
##
## PyGRUB
##
bootloader  = '/usr/lib/xen-4.3/bin/pygrub'
 
######################################################################
##
## CPU(s) + memory size
##
memory      = '256'
vcpus       = '1'
 
######################################################################
##
## Disk device(s).
##
root        = '/dev/xvda1 ro'
disk        = [ 'file:/xen/images/irc.disk,xvda1,w',
                'file:/xen/images/irc.swap,xvda2,w' ]
 
######################################################################
##
## Hostname
##
name        = 'irc'
 
######################################################################
##
## Networking
##
dhcp        = 'dhcp'
vif         = [ 'mac=00:16:3e:0f:47:08,bridge=xenbr1' ]                                   
 
######################################################################
##
## Behaviour
##
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'

ngircd configuration

The ngircd config is located in /etc/ngircd/ngircd.conf. It is configured as follows:

##
## ngircd.conf for irc.offbyone.lan
##
[Global]
    Name = irc.offbyone.lan
    Info = LAIR @ CCC IRC Server

    # Information about the server and the administrator, used by the
    # ADMIN command. Not required by server but by RFC!
    AdminInfo1 = Matthew Haas
    AdminInfo2 = lab46.corning-cc.edu/haas
    AdminEMail = haas@corning-cc.edu

    #Ports = 6667, 6668, 6669
    Ports = 6667
    MotdFile = /etc/ngircd/ngircd.motd

    # Do NOT change this on Debian! The Initscript takes care of this file!
    PidFile = /var/run/ngircd/ngircd.pid

    # After <PingTimeout> seconds of inactivity the server will send a
    # PING to the peer to test whether it is alive or not.
    PingTimeout = 128

    # If a client fails to answer a PING with a PONG within <PongTimeout>
    # seconds, it will be disconnected by the server.
    PongTimeout = 32
    
    # The server tries every <ConnectRetry> seconds to establish a link
    # to not yet (or no longer) connected servers.
    ConnectRetry = 64

    # Should IRC Operators be allowed to use the MODE command even if
    # they are not(!) channel-operators?
    OperCanUseMode = yes

    # Maximum number of simultaneous connection the server is allowed
    # to accept (<=0: unlimited):
    MaxConnections = 0

    # Maximum number of simultaneous connections from a single IP address
    # the server will accept (<=0: unlimited):
    MaxConnectionsIP = 128

    # Maximum number of channels a user can be member of (<=0: no limit):
    MaxJoins = 0

[Operator]
    Name = wedge
    Password = -REDACTED-

[Server]
    Name = irc.dslab.lan
    Host = irc.dslab.lan

    # Port of the server to which the ngIRCd should connect. If you
    # assign no port the ngIRCd waits for incoming connections.
    ;Port = 6667

    # Own password for the connection. This password has to be configured
    # as "PeerPassword" on the other server.
    MyPassword = serviceslinkp

    # Foreign password for this connection. This password has to be
    # configured as "MyPassword" on the other server.
    PeerPassword = serviceslinkm
    Group = 42

[Channel]
    Name = #offbyone
    Topic = OffByOne chat
    Modes = tn

[Channel]
    Name = #lair
    Topic = LAIR chat
    Modes = tn

[Channel]
    Name = #unix
    Topic = CSCS1730 UNIX/Linux Fundamentals Class chat
    Modes = tn

[Channel]
    Name = #hpc
    Topic = HPC
    Modes = n

[Channel]
    Name = #asm
    Topic = Computer Organization class chat
    Modes = n

[Channel]
    Name = #lab46
    Topic = Lab46 chat
    Modes = n

# -eof-

ngircd motd

Nothing fancy, but here it is nonetheless:

######################################################################
##
## irc.offbyone.lan - LAIR IRC server
##
## If you know your class channel(s), you may "/join CHANNEL_NAME"
## them now.
##
## For help, "/join lab46"
##
## Regular rules apply: Play nice or go home.
##

eggdrop

Debian includes the eggdrop bot in its package database, appears to be the latest and greatest (1.6.19).

I installed it, and then set about getting it set up.

adding irc user

I decided to call my bot 'Willem', so I went and created a local system account on irc: willem (id/gid of 200).

willem's home directory is located in /var/lib/willem, and will host an eggdrop installation with megahal module (and other goodies as I see fit).

Pertinent configuration information follows.

building megahal module

The eggdrop megahal module is not available from the package database, so we have to build it from source.

I located a different branch of the megahal module than what has been commonly utilized in classes, and am trying that out. Information on it can be found here: http://thelastexit.net/megahal/index.html

To compile it, I did the following (on a system with a build environment… note you pretty much need build-essential + tcl8.4-dev installed for eggdrop to configure):

apt-get source eggdrop
cd eggdrop-1.6.19
cd src
cp main.c main.c.old
cp -f main.c.new main.c
cd mod
mkdir megahal.mod
cd megahal.mod
wget http://thelastexit.net/megahal/megahal.mod.3.5.zip
unzip megahal.mod.3.5.zip
cd ../../..
./configure
make config
make

At this point eggdrop is built, along with the modules… there is a megahal.so now residing in the base of the eggdrop directory.

This needs to be copied into the module directory for the system-installed eggdrop.