OpenSUSE Leap 42: Install ngIRCd

This article will describe installing ngIRCd which is IRC server.

1 Install ngIRCd

The following script will install ngIRCd.

#!/bin/sh

set -e

DOMAIN=opensuse-14-ngircd.hiroom2.com

O=http://download.opensuse.org
A=${O}/repositories/server:/irc/openSUSE_Leap_42.2/
sudo zypper ar -f -n Applications ${A} Applications
sudo zypper -n --gpg-auto-import-keys ref
sudo zypper -n in ngircd

sudo sed -e "s/Name = irc.example.net/Name = ${DOMAIN}/g" \
     -e 's/;OperCanUseMode = no/OperCanUseMode = yes/g' \
     -e 's/;Name = TheOper/Name = TheOper/g' \
     -e 's/;Password = ThePwd/Password = ThePwd/g' \
     -i /etc/ngircd.conf

for t in FW_SERVICES_EXT_TCP FW_SERVICES_DMZ_TCP FW_SERVICES_INT_TCP; do
  sudo sed -e "s/^${t}=\"\(.*\)\"/${t}=\"\1 6667\"/g" \
       -i /etc/sysconfig/SuSEfirewall2
done
sudo systemctl restart SuSEfirewall2

sudo systemctl enable ngircd
sudo systemctl restart ngircd

2 Other configuration

ngIRC configuration file is /etc/ngircd.conf.

  • Name = TheOper and Password = ThePwd is IRC operator username and password. This is used for OPER command. Change these for your username and password. If you do not need IRC operator, remove replacement by sed -e option.
  • Password in [Global] section is for password authentication when connecting IRC server.
  • Listen in [Global] section is for IP address range to be listened.
  • Port in [Global] section is for port to be listened. Default port is 6667.
  • In order to get channel operator privilege when you have no privilege, get IRC operator privilege with OPER command and get channnel operator privilege with OP command.
/OPER TheOper ThePwd
/OP