Hack and / - What Really IRCs Me: Twitter
In last month's column, I talked about the fact that I thought IRC was the ideal interface for quick communication with my friends. I keep an IRC session running at all times within a screen session, so I can continuously lurk in all of my channels. Because many of my friends use IM instead of IRC though, I've had to figure out ways to manage all of my communication without having a ton of different programs open. Last month, I discussed how I used Bitlbee so I could access all sorts of IM services from my IRC client, and I promised that in the follow-up column, I would talk about how to do something similar for Twitter.
In case you didn't read last month's Point/Counterpoint column, let me summarize my opinion here. I don't see the point of Twitter. I think everything people use Twitter for already could be achieved with IRC and instant messaging without the character limits. Again, IRC is my ideal way to communicate, but now some of my friends (ahem Bill) talk more on Twitter than they do on IRC. So after much prodding from Bill, I bit the bullet and registered a Twitter account so I could see what the fuss was about.
Now, just because I had a Twitter account didn't mean I was going to flood the Internet with every meal and traffic jam in my life. My main requirement for setting up the account at all was that I could access everything via IRC. That way, Twitter was nothing more than another IRC channel, only with higher latency and lower stability. To be honest, I mostly use it in “read-only” mode and just read other people's tweets.
It turns out I'm not the only one who wanted to access Twitter over IRC, and in fact, quite a few different programs out there provide a local IRC gateway to Twitter. Unfortunately, none of the programs have been packaged for my distribution yet, so after struggling to get a few running, I finally found one with a reasonably simple install that worked: tircd.
tircd is a simple Perl script that works much like Bitlbee. When you start the program, it creates a new IRC server on your local machine that you can connect to with an IRC client. The only difference is that it interfaces with your Twitter account, so people you follow show up as users in the channel, and their tweets show up as normal chat messages. Once you are in the channel, everything you type becomes a new Twitter message as well, so it behaves much like any other IRC channel.
To install tircd, first go to the main project page at code.google.com/p/tircd, and download the latest version. As with many Perl scripts, tircd makes use of some CPAN modules you might not have on your system, so dust off your Perl programmer hat, and type the following command as root to install the CPAN modules:
# cpan -i POE POE::Filter::IRCD Net::Twitter
If this is the first time you've used CPAN on your system, you first will have to go through a basic CPAN configuration process, so it knows which mirrors to use and whether you have any proxies in place. Apart from when you choose the mirrors, the default settings should be fine, and when you select the mirrors, simply pick a few that might be close by.
Once the CPAN modules are installed, extract the tircd package in some directory (your home directory works), and then change to that directory. You'll see that only a few files are inside:
$ tar xzvf tircd_v0.7.tar.gz $ cd tircd $ ls ARTISTIC GPL tircd.cfg tircd.pl tircd.pod
tircd includes a sample configuration file that is heavily commented, so you can see what each option does. The default settings should work in most situations, unless you already run a local IRC server (such as Bitlbee in my case). If you do run another IRC server, change the port setting in the file from port 6667 to port 6668 so it won't conflict.
To start tircd, simply execute the tircd.pl script and pass the path to the tircd.cfg file as an argument. Because I was already in the tircd directory, I could type:
$ ./tircd.pl ./tircd.cfg
You should see a number of log messages scroll by in the terminal, and if you want to use the terminal for something else, don't forget to add the & character at the end to start this in the background. Now you might be wondering how you enter your account information. All of this is set when you connect to the local server. Just use your Twitter user name and password as authentication. For instance, on most command-line IRC clients, you would type:
/server localhost 6667 twitter_password twitter_username
In my case, as I already had Bitlbee running on port 6667, I connected to port 6668:
/server localhost 6668 twitter_password twitter_username
Once you are connected to the tircd server, join the #twitter channel. tircd automatically imports everyone you are following, so they show up as users in the channel, and you also will see their recent posts. Any users that follow you back are voiced (+v).
Trending Topics
| You Need A Budget | Feb 10, 2012 |
| The Linux powered LAN Gaming House | Feb 08, 2012 |
| Creating a vDSO: the Colonel's Other Chicken | Feb 06, 2012 |
| Your CMS Is Not Your Web Site | Feb 01, 2012 |
| Casper, the Friendly (and Persistent) Ghost | Jan 31, 2012 |
| Razor-qt 0.4 - Qt based Desktop Environment | Jan 30, 2012 |
- Linux-Based X Terminals with XDMCP
- Readers' Choice Awards 2011
- 100% disappointed with the decision to go all digital.
- Parallel Programming with NVIDIA CUDA
- You Need A Budget
- Validate an E-Mail Address with PHP, the Right Way
- Python for Android
- The Linux powered LAN Gaming House
- The Linux RAID-1, 4, 5 Code
- RSS Feeds
- Gnome3 is such a POS. No one
1 hour 7 min ago - Gnome 3 is the biggest POS
1 hour 18 min ago - I didn't knew this thing by
7 hours 22 min ago - Author's reply
10 hours 47 min ago - Link to modlys
11 hours 53 min ago - I use YNAB because of the
12 hours 5 min ago - Search
17 hours 8 min ago - Question
17 hours 31 min ago - for the record
17 hours 34 min ago - That's disappointing. Thanks
19 hours 57 min ago






Comments
Add update@identi.ca as your
Add update@identi.ca as your jabber contact; Enable twitter bridge in identi.ca; use bitlbee to connect to your IM account ; /msg update@identi.ca to post identi.ca/twitter updates;
Just might get a twitter acct after all
Hope they can sustain the additional load
/me ducks the tomatoes thrown at joke in bad taste
8^P