Quantcast
Channel: OpenSourcery - IRC
Viewing all articles
Browse latest Browse all 2

Fun with IRC Proxies

$
0
0
For internal communications OpenSourcery makes heavy use of IRC, which means I had to re-learn how to use this venerable technology. The last IRC client I'd used with any frequency was ircii, and on my first day at OpenSourcery I fired up XChat, since it was already installed. There's an incredibly rich variety of software that utilizes IRC to communicate, however, and I soon began experimenting with different combinations of software as part of my IRC setup. What I ended up with was a hydra-like proliferation of clients spread over two machines. At the center of it is irssi-proxy, an enormously useful tool for using IRC in any number of ways at once. At OpenSourcery, you're generally expected to respond to IRC "pings:" If someone addresses you by name in IRC, your client needs to notify you somehow if you're not watching the chat log. This became an issue for me when I switched from XChat to irssi, so I began using IrssiNotifier to provide GUI notifications when someone pinged me in IRC. I even submitted a (badly-written) patch to the authors after I added the beginnings of a feature to notify when someone mentioned a keyword. Unfortunately my python skills are rather atrophied and I didn't include any GUI functionality, so I don't think they're going to accept the patch, and in fact I stopped using my patched version when I decided keyword pings weren't that useful to me. Another convention that OpenSourcery makes heavy use of is prefacing your nick with an "x" when you're away or not responding to IRC pings, a practice we call "x-ing out." After becoming frustrated with not being able to tell who was actually at their desk, Randall suggested we try automating this, using something like the "auto-away" provided by many GUI clients that will change your presence status after a period of inactivity. There's a solution for irssi as well which I found in this blog post. Of course, my version of the provided script actually changes my nick instead of using the /away command, but it's mostly identical otherwise. Unfortunately the link to the socket-interface irssi script is broken, but it's now available from the author's github repository. To load this script in irssi, place the file in $HOME/.irssi/scripts and add the line /script load socket-interface.pl to $HOME/.irssi/startup and restart irssi. You can also use that command to enable the socket interface in a running irssi instance, of course. So by this point, I had what I considered to be a pretty complete setup. I was getting GUI notifications on IRC pings and was auto-x-ing out whenever I locked my screen. It was at this point that I found another deficiency: I wasn't able to access the office IRC when I wasn't in the office. It's trivial to open an SSH tunnel to our server from anywhere of course, so I decided to run my irssi in a screen session on my home server, and connect to that session when I needed to use IRC. This is a common technique, most of the IRC power-users I know do this. However I still needed a way to get GUI notifications and auto-x functionality. This was where I began to realize the full power of irssi-proxy, which I was already using to enable notifications. By loading the proxy on my main irssi session and opening a tunnel to the corresponding port on my home server, I was able to get full GUI notifications just as I had before, which I was rather impressed by. However there is still no solution for using ssh to tunnel UNIX domain sockets, which is the communication method used by my auto-away script. This was when I realized that I could use a local irssi to connect to the proxy, thus enabling the use of domain sockets and reinstating auto-away functionality. At this point my main IRC interface was irssi running on my home machine in a screen session over ssh, which was sufficient, but I was beginning to realize that the irssi proxy allowed me to use any client I wanted. Since I was already using Pidgin for instant messaging, I thought I'd try using it for IRC as well. The great thing about having an IRC proxy is you can experiment with different clients without interrupting your presence. There is an annoying issue that I encountered when using Pidgin to connect to the irssi proxy: If you're already joined to a channel, the join command from Pidgin produces no acknowledgement from the server. This means that you won't be able to open an IRC chat into a given channel if you've already joined using another client. The solution I've used so far is to part all channels in the local irssi session before joining the channels in Pidgin. I'm still looking for a better workaround. In the meantime, it's nice to be using a single, modern GUI for all my online chatting and presence. The drawbacks of this setup are obvious, and legion. I still haven't effectively automated any of this, so starting an IRC session with all my desired features is rather involved. Sometimes I forget to start one of the components and miss my IRC pings for half a day. Some clients behave differently when connected to a proxy instead of an actual IRC server. The proliferation of tunnels, processes, and client software is a bit confusing and hard to manage, which I'm pretty sure is an argument in favor of Chad's IRC client project, which has the potential to simplify ridiculous setups like mine. There's also the Quassel IRC client, which I'm planning to try out soon. The appeal of this setup is largely about flexibility. It's now trivial for me to communicate on my office IRC from any machine with ssh and an IRC client, without affecting my presence. Kind of a neat trick, and potentially useful. It's also fun to be able to use as many IRC clients as I want simultaneously.

Tagged as: 


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images