ZNC

From SoylentNews
Jump to navigation Jump to search

SoylentNews runs its own IRC bouncer (ZNC) for staff use. (See the SoylentNews IRC Page for background information on IRC and our SoylentNews IRC (Internet Relay Chat) server.)

What is an IRC bouncer?

An IRC bouncer is benign. It acts as your proxy to IRC servers of your choice, a concierge if you will. While you are away, the bouncer stays connected to all your IRC networks and channels as your representative then (optionally) tells you everything that went on while you were away.

Rather than your connection to an IRC server being client >> IRC server(s) it becomes client >> Bouncer >> IRC server(s). The nice thing is the bouncer never sleeps so Bouncer >> IRC server(s) is always maintained, the client can come and go at will. When you reconnect your IRC client to the Bouncer you can (optionally) get scrollback for all the channels you were in prior to your client disconnection.

What is ZNC?

ZNC is a popular IRC bouncer. See ZNC Along with psyBNC these two are the most commonly used IRC Bouncers. psyBNC seems unmaintained right now unfortunately.

ZNC Settings Inheritance

As a user of ZNC you will find 3 levels of configuration options. Your Settings > Network Settings > Channel Settings.

Settings inherit from left to right in that list. i.e. if you check a module on in Your Settings it will be on in any Network or Channel you add. Hence if you are using ZNC to connect to multiple IRC networks, you probably want to keep Your Settings to a minimum and configure things on a per Network or Channel basis e.g. to be sane about the amount of scrollback you get on a busy Network or Channel. You can override this inheritance at any time by specifying details at the lower level.

n.b. If you use the chansaver module, you never need to bother with the Channel level stuff, chansaver remembers what channels you are in on any given network and maintains connection there, so there is no need to go to that level of granularity unless you really want to.

The following sections assume you will just be using the SN bouncer to connect to SN IRC, so a lot is placed into the top level settings. If you wish to connect to other Networks using the SN bouncer, you're free to do so, but note you will need to customise your nickserv settings at the Network level for each

Setting up ZNC - for Staff

Assumptions at this point are that you have a SoylentNews IRC nick, have it registered with nickserv, have an irc client (rather than using the web interface) and are SN staff.. so let's get on with the nuts and bolts...

Your Settings

  • An IRC Admin will notify you of your ZNC username and initial password.
  • Go to SN ZNC Web Interface with a web browser and login with your shiny new ZNC credentials.
  • Go to Your Settings in the right hand menu and change your password in the subsequent screen by populating the Password and Confirm password fields, scroll all the way down and hit Save.
  • Probably want to go ahead and Logout & log back in with your new password at this point.

  • Return to Your Settings and populate the IRC Information section (same kind of info you'd use in an IRC client).
  • Scroll down to the Modules section - as a minimum you probably want chansaver and ctcpflood checked, you may want to check some of the others n.b. the name of each module is clickable to bring up a ZNC wiki page on what they each do.
  • Further down the page still, in Flags - you probably want to check Prepend Timestamps - this prepends played back messages with their time/date on client reconnection after a time away.
  • Nearly done - ZNC Behaviour section - probably want to set a Timezone there so replayed messages carry your localised time rather than UTC. You can also have some fun with CTCP replies. e.g.
CLIENTINFO No
FINGER Kinky
PING No
TIME No
USERINFO No
VERSION No

  • Finally... hit Save :)

Add the SN IRC Server as a Network

  • First thing to note here - as soon as you hit Save in this part of the configuration, ZNC will attempt to connect as you, using your nickserv auth details, so it is imperative to drop your direct IRC Client connection before doing so.
  • Go To Your Settings and hit the Add link in the Networks section. Name it Soylent for the purposes of this article... this comes in later.
  • If you populated your SN IRC details at the Your Settings level you can leave much of this blank (inheritance remember). But feel free to populate the Top fields again if it satisfies an OCD itch.
  • Make sure BindHost is set to ::1, Active: "Connect to IRC & automatically re-connect is checked, add ::1 +6697 in the "Servers of this IRC network:" box, set Flood Protection as you wish, it's self explanatory.
  • Scroll down to Modules, at a minimum you will want chansaver, keepnick and nickserv checked. Copy / pasta your nickserv password into the box to the right of the nickserv checkbox so ZNC can authenticate as you.
  • Disconnect your direct IRC Client > SN IRC server connection, then hit Save in the ZNC interface.
  • All being well, at this point ZNC connects as you to the SN IRC server and sits amiably at the server channel only.

Connecting your IRC Client to the Bouncer

This section is unspecific as it is client dependent, but it basically involves adding a new connection in your IRC client. It's just the usual stuff you would configure for any new IRC network you connect to. Below are the quirks for Hexchat.

Servers tab: irc.soylentnews.org/60000
Check - Use SSL for all the servers on this network
Check - Accept invalid SSL certificates (self-signed cert) - Hexchat farts on self-signed certs.
Nick name: $YourZNCUserName$/Soylent (Obviously substitute your ZNC username in there)
User name: $YourZNCUserName$/Soylent (Obviously substitute your ZNC username in there)
Password: $Your ZNC passwd$

  • At this point you should be able to connect your IRC client to the new network you just setup and find it sitting in the server channel. If you got that far all you have to do is /j #channels to get the bouncer into your usual channels.
  • Henceforth when you disconnect your client from the bouncer, the bouncer will will stay in channel for you (you can use the auto-away module if you want) and play back what went on in your abscence on re-connect.
  • If you got this far, good work! It all slots into place once you have one network up and running. Now you are free to configure ZNC to your whims either by the web interface or by entering /znc while connected via the SN bouncer. You will get a PM from "status" - this article will not cover ZNC configuration via that method.