<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aaron Toponce &#187; irssi</title>
	<atom:link href="http://pthree.org/category/irssi/feed/" rel="self" type="application/rss+xml" />
	<link>http://pthree.org</link>
	<description>Linux.  GNU.  Freedom.</description>
	<lastBuildDate>Sun, 05 Feb 2012 14:33:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha</generator>
		<item>
		<title>Expand URLs in Irssi</title>
		<link>http://pthree.org/2011/12/22/expand-urls-in-irssi/</link>
		<comments>http://pthree.org/2011/12/22/expand-urls-in-irssi/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 18:36:46 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=2157</guid>
		<description><![CDATA[If you&#8217;re an IRC junkie, and spend hours a day in Irssi, then this post might be useful to you. It&#8217;s all the rage these days to shorten URLs with fancy URL shortening services. Heck, even I have one. They are certainly nice to have, when links are exceptionally long, such as search result URLs, [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re an IRC junkie, and spend hours a day in Irssi, then this post might be useful to you.</p>
<p>It&#8217;s all the rage these days to shorten URLs with fancy URL shortening services. Heck, even I have one. They are certainly nice to have, when links are exceptionally long, such as search result URLs, and just the mere wrapping from one line to the next breaks the URL (not to mention, any additional characters added in the line break, such as spaces, other characters, etc.). I&#8217;ve used, and still use, link shortening services for IM, IRC, email, Identi.ca, Twitter, etc., only when I suspect the link could break as a result of line wrapping. I use them sparingly, and only use them if they provide a preview feature, giving the link to the preview.</p>
<p>While they have their advantages, they certainly come with a cost. Link rot is a very real concern, should the link shortening service go offline. You can nest shortened links in each other, concealing JavaScript/CSS mouse hovers. They can contain all sorts of nasties, and you don&#8217;t know what you&#8217;re getting into, unless you use some sort of software to expand the URL for you, before you actually follow the link. I&#8217;ve already blogged about using a simple shell function to expand shortened URLs (post at <a href="http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls/">http://pthree.org/2011/10/18/use-wget1-to-expand-shortened-urls</a>/). Well, now it&#8217;s time for Irssi to automatically provide the function for me.</p>
<p>Presenting <a href="https://github.com/jcande/Expand-URLs">https://github.com/jcande/Expand-URLs</a>. This is a simple Irssi script that will identify URLs in a given notice, whether in private or in public, and expand them using the <a href="http://longurl.org">http://longurl.org</a> service (I think a patch for doing the lookup without a 3rd party should probably be submitted, as any 3rd party expanding service might go offline).</p>
<p>For me, this script is exceptionally valuable, because I connect to a local Bitlbee instance with Irssi, and use Bitlbee to connect to Twitter. Unfortunately, Twitter wants to track your clicks with their http://t.co service. Every link longer than 19 characters (20 for HTTPS) submitted to Twitter is automatically shortened with this wrapper. They claim that the service is to identify malicious links, and prevent them from being posted, should one be identified. But certainly, a company the size of Twitter can do so much more with this new &#8220;service&#8221;. They could track what links are clicked and when. They can use this information to identify what stuff you&#8217;re interested in, and when you use the service. They can track who clicks the link by IP or ISP. Of course, it would be foolish to not sell this information to advertisers, to target additional advertising on Twitter or other sites, based on this info.</p>
<p>At any event, this is one of the few Irssi scripts that I find really, really useful for day-to-day. It makes the Twitter timeline a bit chatty, now that lengthy URLs are being shown, and a few break due to line wrapping. And that is a pain, no doubt. But, the vast majority of links don&#8217;t break, and it&#8217;s nice seeing where I&#8217;ll be taken when visiting the link. Keeping Twitter from tracking me, despite the occasional link breakage, is worth it.</p>
<p>P.S.: There is also a WeeChat script at <a href="http://www.weechat.org/files/scripts/expand_url.pl">http://www.weechat.org/files/scripts/expand_url.pl</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/12/22/expand-urls-in-irssi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Tmux Hardstatus Theme</title>
		<link>http://pthree.org/2011/08/31/my-tmux-hardstatus-theme/</link>
		<comments>http://pthree.org/2011/08/31/my-tmux-hardstatus-theme/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 20:32:13 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1992</guid>
		<description><![CDATA[Recently, I&#8217;ve made the switch from GNU Screen to Tmux for my remote terminal multiplexor. I still prefer GNU Screen for serial connections, however (something the Tmux developers don&#8217;t seem to think is important). So, when getting it setup, I wanted my hardstatus line to imitate my GNU Screen hardstatus line as closely as possible. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve made the switch from GNU Screen to Tmux for my remote terminal multiplexor. I still prefer GNU Screen for serial connections, however (something the Tmux developers don&#8217;t seem to think is important). So, when getting it setup, I wanted my hardstatus line to imitate my GNU Screen hardstatus line as closely as possible. Well, I got it to that point, then took it even further to work with <a href="http://pthree.org/2010/01/12/more-88-madcows/">my custom Irssi</a> and <a href="http://pthree.org/2009/10/14/more-zsh-prompt-love/">ZSH themes</a> (I want everything to tie in nicely). The only thing left is getting Mutt in order, but that&#8217;s for another post.</p>
<p>At any event, here is the configuration for the theme:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># hardstatus line theme<br />
set-option -g status-fg white<br />
set-option -g status-bg default<br />
set-option -g status-justify centre<br />
set-option -g status-left-length 13<br />
set-option -g status-left '#[fg=green][ #[fg=black,bright]#h #[fg=green,nobright]][#[default]'<br />
set-option -g status-right-length 16<br />
set-option -g status-right '#[fg=green]][ #[fg=black,bright]#(date +&quot;%m/%d %H:%M&quot;) #[fg=green,nobright]]#[fg=default]'<br />
set-window-option -g window-status-current-format '#[fg=red,bg=default]( #[fg=white,bright,bg=default]#I:#W#[fg=red,nobright,bg=default] )#[fg=default]'<br />
set-window-option -g window-status-alert-attr bold<br />
set-window-option -g window-status-alert-fg yellow<br />
set-window-option -g window-status-alert-bg default</div></td></tr></tbody></table></div>
<p>Obviously, this won&#8217;t look that great on a terminal with a white background (or really any color other than black). And here is the screenshot:</p>
<p><a href="http://pthree.org/wp-content/uploads/2011/08/tmux.png"><img src="http://pthree.org/wp-content/uploads/2011/08/tmux.png" alt="" title="tmux" width="572" height="21" class="aligncenter size-full wp-image-1993" /></a></p>
<p>As you can clearly see, the active window you&#8217;re under is bold white with red parentheses around the window name. The previous window you were in is marked with a dash &#8216;-&#8217; (by default). An alert in a terminal will change the text to bold yellow, so long as you&#8217;re not in that window (as you can see with the &#8220;mutt&#8221; window). It ties in nicely with the <a href="http://pthree.org/wp-content/uploads/2011/08/88_madcows.theme">88_madcows.theme</a> file for Irssi, and the ZSH theme I built.</p>
<p>I&#8217;m new to building Tmux hardstatus lines, so if there is something I should be doing differently, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/08/31/my-tmux-hardstatus-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pimp My Irssi &#8211; Part 2</title>
		<link>http://pthree.org/2011/08/18/pimp-my-irssi-part-2/</link>
		<comments>http://pthree.org/2011/08/18/pimp-my-irssi-part-2/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 04:52:39 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1967</guid>
		<description><![CDATA[It&#8217;s been over 3 years since I wrote the original article about pimping out Irssi, with various themes, scripts, aliases, etc. Well, I figure it&#8217;s probably time for an update. After all, if you know anything about me, you know I&#8217;m an IRC junkie with Irssi, and currently having a love affair with Bitlbee. Aliases [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been over <a href="http://pthree.org/2008/01/06/pimp-my-irssi/">3 years since I wrote the original article</a> about pimping out Irssi, with various themes, scripts, aliases, etc. Well, I figure it&#8217;s probably time for an update. After all, if you know anything about me, you know I&#8217;m an IRC junkie with Irssi, and currently having a love affair with Bitlbee.</p>
<p><strong>Aliases</strong><br />
I&#8217;ve only added two aliases to Irssi since we&#8217;ve last met. The first alias comes from the main <a href="http://irssi.org/documentation/tips">Irssi.org</a> website. If you scroll to the bottom of the page, there is a tip close to the end for adding all open channels to your &#8220;/channel list&#8221;. The only thing it was missing was saving the window layout to the config, so next time you open your Irssi, not only will you be rejoined to all of your channels, but they&#8217;ll all be in the same place they were last time. Here&#8217;s the alias:</p>
<blockquote><p>/alias CHANNADD script exec foreach my \$channel (Irssi::channels()) { Irssi::command(&#8220;channel add -auto \$channel->{name} \$channel->{server}->{tag} \$channel->{key}&#8221;)\;}; layout save; save</p></blockquote>
<p>This next alias will effectively &#8220;mark all as read&#8221; for your channels. For whatever reason, you may like to have a clean slate for channel activity in your statusbar, rather than all the channels showing some form of activity. This alias will clean up your statusbar, so any new activity becomes immediately available. As mentioned, think of this as &#8220;marking all channels as read&#8221;:</p>
<blockquote><p>/alias READ script exec \$_->activity(0) for Irssi::windows</p></blockquote>
<p><strong>Scripts</strong><br />
My scripts have changed a little bit, but not by much. Really, there&#8217;s only two scripts worth mentioning about that I haven&#8217;t already done so in the previous post.</p>
<p>The first script is similar to &#8220;<a href="http://scripts.irssi.org/scripts/screen_away.pl">screen_away.pl</a>&#8220;, except for tmux(1). I&#8217;ve adopted nesting Irssi behind tmux(1) instead of screen(1) because I just couldn&#8217;t get bolded black and white to work correctly. Now, everything looks as it should, with zero formatting issues. At any event, &#8220;<a href="http://cybione.org/~cdidier/code/misc/tmux_away.pl">tmux_away.pl</a>&#8221; does the same thing, in that it sets your &#8220;/away&#8221; status when you detach your session, and resets it when you reattach.</p>
<p>The second script is &#8220;<a href="http://scripts.irssi.org/scripts/trigger.pl">trigger.pl</a>&#8220;. This script is mostly a search/replace script for events that happen in the channel. For example, if you don&#8217;t like the &#8220;F-word&#8221;, you can change it to something less vulgar with trigger.pl. It can handle much more, but I only use it mainly for that purpose. The triggers I&#8217;ve set up this far are as follows:</p>
<blockquote><p>-publics -regexp &#8216;Message from unknown participant &#8216; -replace &#8221;<br />
-all -nocase -regexp &#8216;&lt;/?(a|b|body|div|em|font|i|s|u)( +\w+=&#8221;.*?&#8221;)*&gt;&#8217; -replace &#8221;<br />
-privmsgs -nocase -regexp &#8216;&amp;amp;&#8217; -replace &#8216;&#038;&#8217;<br />
-privmsgs -nocase -regexp &#8216;&amp;gt;&#8217; -replace &#8216;>&#8217;<br />
-privmsgs -nocase -regexp &#8216;&amp;lt;&#8217; -replace &#8216;<'<br />
-privmsgs -nocase -regexp '&amp;quot;' -replace '"'<br />
-publics -masks 'update!update@identi.ca' -channels '&#038;bitlbee' -regexp '^aaron: ' -replace ''</p></blockquote>
<p>All of my triggers are Bitlbee triggers. Let&#8217;s cover each trigger that I&#8217;ve created, just so there&#8217;s no confusion:</p>
<ol>
<li>When joining Jabber MUCs with Bitlbee, the Jabber server you&#8217;re connecting to can be configured to print the past 20 lines (or whatever) of the previous log, so you can get caught up to speed on the discussion quickly. However, if the user that said something in that log is not in the MUC when you join, you&#8217;ll see &#8220;Message from unknown participant&#8221; in the backlog. This trigger removes that completely.</li>
<li>When Pidgin or Adium users get online, sometimes the clients send HTML/XML to Bitlbee. THis trigger strips the HTML/XML tags as listed completely.</li>
<li>Similar to trigger #2, this trigger replaces the HTML &#8220;&amp;amp;&#8221; with &#8220;&#038;&#8221;;</li>
<li>Similar to trigger #2, this trigger replaces the HTML &#8220;&amp;gt;&#8221; with &#8220;>&#8221;;</li>
<li>Similar to trigger #2, this trigger replaces the HTML &#8220;&amp;lt;&#8221; with &#8220;<";</li>
<li>Similar to trigger #2, this trigger replaces the HTML &#8220;&amp;quot;&#8221; with &#8216;&#8221;&#8216;;</li>
<li>I use <a href="http://identi.ca/eightyeight">Identi.ca</a> with the XMPP bot in the &#8220;&#038;bitlbee&#8221; channel. I know the bot is addressing everything to me, so I don&#8217;t want to see each notice begin with &#8220;aaron: &#8220;, so I&#8217;ve stripped that out completely, so the notice actually starts with the user nickname. If you&#8217;re interfacing with the bot in a private channel, rather than in &#8220;&#038;bitlbee&#8221;, then this trigger won&#8217;t do much good for you. You&#8217;ll need to modify it.</li>
</ol>
<p><strong>Theme</strong><br />
As much as I try to do a new theme, I always come back to my custom-built &#8220;<a href="http://irssi.org/themefiles/madcow.theme">madcow.theme</a>&#8221; called &#8220;<a href="http://pthree.org/wp-content/uploads/2011/08/88_madcows.theme">88_madcows.theme</a>&#8220;. It&#8217;s the awesome. <a href="https://lh6.googleusercontent.com/-ZxonszQRqkk/S0xtnLiBU0I/AAAAAAAABUE/X7lytviExY0/s800/88_madcows.png">Screenshot</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2011/08/18/pimp-my-irssi-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Twitter and Identica support with Bitlbee</title>
		<link>http://pthree.org/2010/09/29/twitter-and-identica-support-with-bitlbee/</link>
		<comments>http://pthree.org/2010/09/29/twitter-and-identica-support-with-bitlbee/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 23:43:33 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[Identica]]></category>
		<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1584</guid>
		<description><![CDATA[I just discovered this today, and anything that makes my Irssi and Bitlbee experience better is always worth a blog post. First off, before beginning, make sure you have the latest version of Bitlbee. The options I&#8217;ll be going through in this tutorial require version 1.2.8 or later. If you don&#8217;t have at least this [...]]]></description>
			<content:encoded><![CDATA[<p>I just discovered this today, and anything that makes my Irssi and Bitlbee experience better is always worth a blog post.</p>
<p>First off, before beginning, make sure you have the <a href="http://bitlbee.org/main.php/download.html">latest version of Bitlbee</a>. The options I&#8217;ll be going through in this tutorial require version 1.2.8 or later. If you don&#8217;t have at least this version, this tutorial might not work for you completely. Twitter support was added in 1.2.6, but getting it to work with Identica might not work. I&#8217;ll outline both Twitter and Identica, as they have different setup requirements.</p>
<p><strong>Twitter support</strong><br />
Twitter no longer supports the username/password combination to authenticate your client with the service. Instead, they use OAuth for the authentication. Bitlbee supports Twitter&#8217;s OAuth. So, when asked to provide a password with the account, just give something totally bogus. Your password won&#8217;t actually be used. So, in your Bitlbee root window, type the following, replacing &#8220;username&#8221; with your actual Twitter account username. Also, make sure to replace the account number with the appropriate number from &#8220;account list&#8221;. I&#8217;ll assume it&#8217;s &#8220;1&#8243;.</p>
<pre>account add twitter username bogus_password
account list
account set 1/mode chat
save
account 1 on</pre>
<p>Notice, I set the mode to &#8220;chat&#8221;. This makes the Twitter account behave like a standard multi-user chat room. As a result, Bitlbee will create a new room in your IRC client, and add all account that you are following to that room. The great thing with this, is you have full nickname tab completion if your IRC client supports tab-completing nicks. No need to use Twirssi, tweet.im, or other services/plugins if you&#8217;re already using Bitlbee. Personally, I dig it. However, the mode also supports &#8220;one&#8221;, meaning you have a nickname that you must interface with to send all tweets through (like an IM bot) or &#8220;many&#8221;, in which every account you follow will have its own &#8220;buddy&#8221; in your buddy list, that you could send messages to directly. Personally, I like chat best. Play with whatever works for you.</p>
<p><strong>Identica support</strong><br />
I&#8217;m told that the <a href="http://code.bitlbee.org/bitlbee/">BZR branch</a> of Bitlbee (current stable version is 1.2.8, development 1.3) supports Identica natively. However, I only have 1.2.8 installed, so we get to hack up a solution (a rather elegant one at that). The Status.net developers pride themselves in <a href="http://status.net/wiki/API">keeping the API 100% backwards compatible with the Twitter API</a>. This means that even though Bitlbee doesn&#8217;t have native Identica support, it does support it indirectly through the Twitter API. So, we&#8217;ll make a slight change, and we&#8217;ll be good to go.</p>
<p>A couple notes on this method that is worth mentioning. Identica doesn&#8217;t support OAuth. As such, you do need to setup your actual username and password. Unfortunately, this is sent over the Internet in PLAIN TEXT. If you&#8217;re at all concerned about the security of your Identica account, I would recommend interfacing with the <a href="http://status.net/wiki/Jabber_Bot">Jabber bot</a>, as it uses SSL for its connection, and your username and password are actually never sent. However, with the Jabber bot, you don&#8217;t have nickname account tab completion, and you do if you setup Identica the same way we just setup Twitter.</p>
<p>So, weigh out your options. Personally, with me, I prefer using the Jabber bot and using <a href="http://wouter.coekaerts.be/site/irssi/trigger">trigger.pl</a> to do some light text munging fore me to make it rather slick. Not only for the SSL support, but also because I really like the &#8220;reply #[message_id]&#8221; feature of the Jabber bot, and you lose the ability to send a reply to a specific message with this method.</p>
<p>With that said, let&#8217;s see how to set it up. In your main Bitlbee root window (remember, you must use your Identica username and actual password here as OAuth isn&#8217;t supported), type:</p>
<pre>account add twitter username password
account list
account set 2/mode chat
account set 2/oauth false
account set 2/base_url http://identi.ca/api
save
account on 2</pre>
<p>I assumed that setting up Twitter was account &#8220;1&#8243;, so I&#8217;m assuming setting up Identica will be account &#8220;2&#8243;. Replace as needed for your instance. Also, notice that we also set the mode to chat, just like we did with Twitter. However, we changed the OAuth mode to false, because Identica doesn&#8217;t support it, and we changed the &#8220;base_url&#8221; to &#8220;http://identi.ca/api&#8221;. This is needed, so you&#8217;re not sending your messages to Twitter, obviously.</p>
<p>With both Twitter and Identica (or either one), you should have chat windows where you can interface with the service directly using the API. The great thing here is full nickname account tab completion, and the chat window looks great, because it&#8217;s using your IRC native theme and controls, rather than setting up some weird theme (I&#8217;m looking at you Twirssi).</p>
<p>If Bitlbee is running in Irssi, as is the case for me (just search for Irssi on my blog <img src='http://pthree.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ), then this make Irssi a full-blows messaging suite with some pretty extensive scripts that make your IM/IRC/microblogging very versatile, flexible and complete. For me this takes Irssi + Bitlbee to a whole new level. World domination is nearly complete with messaging. Jabber, Facebook (which is really Jabber), Twitter, Identica, IRC all in a single client.</p>
<p>Yeah. I&#8217;m happy.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2010/09/29/twitter-and-identica-support-with-bitlbee/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Happy Open Discussion Day, 2010</title>
		<link>http://pthree.org/2010/05/19/happy-open-discussion-day-2010/</link>
		<comments>http://pthree.org/2010/05/19/happy-open-discussion-day-2010/#comments</comments>
		<pubDate>Wed, 19 May 2010 18:08:43 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>
		<category><![CDATA[Jabber]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1376</guid>
		<description><![CDATA[I almost let today go by without blogging about Open Discussion Day. Of course, lately, I haven&#8217;t been doing much blogging at all, which is entirely out of my person, but anyway, let&#8217;s get onto the festivities. First, so you understand, Open Discussion Day started back 4 years ago when Ploum first blogged about showing [...]]]></description>
			<content:encoded><![CDATA[<p>I almost let today go by without blogging about Open Discussion Day. Of course, lately, I haven&#8217;t been doing much blogging at all, which is entirely out of my person, but anyway, let&#8217;s get onto the festivities.</p>
<p>First, so you understand, Open Discussion Day started back 4 years ago when <a href="http://ploum.frimouvy.org/?2006/04/06/103-may-19th-the-open-discussion-day-19-mai">Ploum first blogged</a> about showing support for open protocols, such as Jabber/XMPP (using Google Talk, jabber.org, and others). <a href="http://pthree.org/2008/02/25/support-free-software-then-ditch-proprietary-im/">I&#8217;ve blogged about it in the past</a>, even though I missed blogging about it last year.</p>
<p>You can start with by checking out the page <a href="http://www.opendiscussionday.org">http://www.opendiscussionday.org</a>. There, you&#8217;ll find a wiki that has some information on how to get started with open communication platforms, protocols and software. Given the ways we communicate with each other on the Internet and elsewhere, it makes sense to advocate supporting these open platforms. Here&#8217;s a brief, non-exhaustive list of various open protocols worth checking out:</p>
<ul>
<li><b>Jabber/XMPP</b>- <a href="http://jabber.org">Jabber</a>/<a href="http://xmpp.org">XMPP</a> is probably the most successful open communication platform to date. According to Wikipedia, it has more than <a href="http://xmpp.org/xsf/press/2003-09-22.shtml">50 million active users</a>, mostly on the Google Talk/Gmail service. It&#8217;s supported on Windows, Mac and Linux. It&#8217;s a federated protocol, which means Jabber/XMPP can communicate across different domains. It uses SSL encryption by default, which means your communication is secure, and most of the clients are free, and solid applications.</li>
<li><b>OMB</b>- The <a href="http://en.wikipedia.org/wiki/OpenMicroBlogging">Open MicroBlogging</a> protocol was started in response to Twitter. Rather than being tied to a particular vendor for your status updates, Laconi.ca, now <a href="http://status.net">Status.net</a>, launched and announced they would provide an open, federated, protocol for broadcasting your &#8220;tweets&#8221;, following others, and others following you. <a href="http://identi.ca">Identi.ca</a> was their product, and it has proven to be very successful, and the open platform has sparked a number of other microblogging servers, all in tight communication. <a href="http://army.twit.tv">http://army.twit.tv</a>, <a href="http://brainbird.net">http://brainbird.net</a>, and <a href="http://status.net/wiki/ListOfServers">others are based on this code</a>, and can all communicate together. Lastly, there are a number of microblogging applications that support Identi.ca, and the others. You can follow me at <a href="http://identi.ca/eightyeight">http://identi.ca/eightyeight</a>.</li>
<li><b>IRC</b>- <a href="http://en.wikipedia.org/wiki/Internet_Relay_Chat">Internet Relay Chat</a> is one of the older forms of open communication in this list, except for email. It uses TCP for the transport protocol, and optionally SSL/TLS for encrypting your communication. As with everything else is this list, IRC is federated, meaning connecting multiple IRC servers together, and communicating transparently. <a href="http://freenode.net">Freenode</a> is probably one of the more common IRC servers for open source projects. <a href="http://oftc.net">OFTC</a>, <a href="http://efnet.org">EFNet</a> and <a href="http://undernet.org">UnderNet</a> are popular as well. There are many IRC clients out there that can get you chatting on any number of different IRC networks at the same time. My personal favorite is <a href="http://irssi.org">Irssi</a>, a text-based client.</li>
<li><b>Email</b>- The last, but definitely not least, however the oldest, and probably most ubiquitous. Everyone is familiar with email, and it&#8217;s rare to find people these days that don&#8217;t have an email address. It too is federated, meaning you can send an email from gmail.com to hotmail.com, without thinking about it. Many open protocols have been built around email, including SMTP, IMAP and POP, as well as their secure, encrypted versions. As much as the Internet would like to see email die, I personally think it will be around for quite some time. The only thing I would ask, is that people stop sending proprietary attachments to their message, bottom post, trim unnecessary cruft from the mail, and write in plain text (I think I might be reversing my stance on HTML email- we&#8217;ll see).</li>
</ul>
<p>Of course, there are many closed discussion platforms and protocols, such as Twitter, Facebook, Skype and MSN/AIM/ICQ/Yahoo. It&#8217;s important to note that you don&#8217;t own your data on these services, unlike the ones I&#8217;ve mentioned above. You are subject to vendor lockin, and everyone else must use those services too, as they don&#8217;t communicate with each other. But, we&#8217;re about the open discussion protocols, not the closed ones, so let&#8217;s continue.</p>
<p>I&#8217;m sure there are many other open communication platforms that would be worthy discussing in this post. I chose what I feel to be the biggest and most successful of the open protocols. The future will tell what else we see in this arena, but right now all I can say, is we have a great deal of options for supporting an open protocol, many of which are doing very, very well. If you have other open communication protocols that you use, make sure you specify them in the comments, or add them to the Open Discussion Day wiki. For the record, I fully support all the open protocols/communication platforms, and you can find me on any of the protocols listed above.</p>
<p>Happy Open Discussion Day, 2010!</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2010/05/19/happy-open-discussion-day-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My ZSH, Irssi and Screen Themes On White And Black Backgrounds</title>
		<link>http://pthree.org/2010/04/29/my-zsh-irssi-and-screen-themes-on-white-and-black-backgrounds/</link>
		<comments>http://pthree.org/2010/04/29/my-zsh-irssi-and-screen-themes-on-white-and-black-backgrounds/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 06:43:38 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[irssi]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1359</guid>
		<description><![CDATA[Now that school is out for the summer, I have a bit of time to work on some of the themes I&#8217;ve created for my ZSH prompt, Irssi and GNU Screen. The first focus of mine was to get all themes working well with both white text on black backgrounds, and black text on white [...]]]></description>
			<content:encoded><![CDATA[<p>Now that school is out for the summer, I have a bit of time to work on some of the themes I&#8217;ve created for my ZSH prompt, Irssi and GNU Screen. The first focus of mine was to get all themes working well with both white text on black backgrounds, and black text on white backgrounds. I&#8217;ve been leaning more and more to black text on white background colors for my default terminals, so I wanted to make sure that everything I was using day-to-day looked good with that setup.</p>
<p>First, my ZSH prompt was <a href="http://pthree.org/2009/10/14/more-zsh-prompt-love/">already developed</a> from the outset with that in mind. So, no additional hacking has been needed on that. There are some elements that I&#8217;m not too terribly excited about. I don&#8217;t care for the dark blue directories on a black background, and I don&#8217;t care for the yellow character devices on a white background. Using the <a href="http://tango.freedesktop.org/Tango_Desktop_Project">Tango scheme</a> for gnome-terminal makes both of those scenarios much more tolerable. However, I do have additional items that I want to put in my prompt, but that will be for a later post. Also, my GNU Screen hardstatus line also needed to be compatible. This wasn&#8217;t that big of a deal, as I only needed to apply some colors to a few elements. Hhere&#8217;s a couple screenshots showing both black and white backgrounds, and how the ZSH prompt inside looks in each. Note the GNU Screen hardstatus line is at the bottom of the terminal.</p>
<table style="width:auto;">
<tr>
<td><a href="http://picasaweb.google.com/lh/photo/VEs4lOWonaHjJUfZhvVAuA?feat=embedwebsite"><img src="http://lh6.ggpht.com/_UjZEx7iINYc/S9pzPJlvNQI/AAAAAAAAAx4/vBb1Xij848s/s144/zsh-screen-white.png" /></a></td>
</tr>
<tr>
<td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="http://picasaweb.google.com/aaron.toponce/DesktopScreenshots?feat=embedwebsite">Desktop Screenshots</a></td>
</tr>
</table>
<table style="width:auto;">
<tr>
<td><a href="http://picasaweb.google.com/lh/photo/L0SeomtjbteBgH95hyKdCA?feat=embedwebsite"><img src="http://lh3.ggpht.com/_UjZEx7iINYc/S9pzPPgsL8I/AAAAAAAAAx0/CjszuCg_Hyw/s144/zsh-screen-black.png" /></a></td>
</tr>
<tr>
<td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="http://picasaweb.google.com/aaron.toponce/DesktopScreenshots?feat=embedwebsite">Desktop Screenshots</a></td>
</tr>
</table>
<p>Second, my Irssi theme also needed to work well with both. As I&#8217;ve already blogged before, I was really, <i>really</i> <a href="http://pthree.org/2010/01/12/more-88-madcows/">impressed with the madcows theme</a>. However, I didn&#8217;t care for a few elements, so I started hacking it, making my own changes. I&#8217;ve tried keeping the true nature of the theme, while still adding my own style. The theme was already largely compatible with my ZSH prompt colors, it just needed some adjustments here and there, before I was totally satisfied. Further, it looked like crap using a white background, so this needed some hacking as well. I think I&#8217;m overall happy with the result, although I&#8217;m sure I&#8217;ve missed many things (like DCC, or CTCP), so there&#8217;s likely much more hacking to go before it&#8217;s perfect. However, for the general day-to-day chat, it&#8217;s 95% there. Screenshots for both backgrounds below:</p>
<table style="width:auto;">
<tr>
<td><a href="http://picasaweb.google.com/lh/photo/0DvCb_vsNGWKN3j6vi7uNg?feat=embedwebsite"><img src="http://lh5.ggpht.com/_UjZEx7iINYc/S9pzOj281fI/AAAAAAAAAxw/YL-NyubDrb8/s144/irssi-white.png" /></a></td>
</tr>
<tr>
<td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="http://picasaweb.google.com/aaron.toponce/DesktopScreenshots?feat=embedwebsite">Desktop Screenshots</a></td>
</tr>
</table>
<table style="width:auto;">
<tr>
<td><a href="http://picasaweb.google.com/lh/photo/Hdxl0nvnQ3wHCfRKiyQWwQ?feat=embedwebsite"><img src="http://lh4.ggpht.com/_UjZEx7iINYc/S9pzOaOQ0uI/AAAAAAAAAxs/iC70wR8vCcI/s144/irssi-black.png" /></a></td>
</tr>
<tr>
<td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="http://picasaweb.google.com/aaron.toponce/DesktopScreenshots?feat=embedwebsite">Desktop Screenshots</a></td>
</tr>
</table>
<p>In a nutshell, the themes are compatible with xterm-color support on most terminals. Mainly, I&#8217;m using bold and normal weights on red, green, yellow, black, white and blue. Anything else takes the default color of the terminal itself, whether it be the foreground text or the background. So, as long as your TERM variable is set to &#8220;xterm-color&#8221; or something better, you should be okay.</p>
<p>This post wouldn&#8217;t be complete without the source for you to try it out. <a href="http://pthree.org/wp-content/uploads/2010/04/all-themes.tar.gz">Here&#8217;s a compressed tarball</a> for giving it a shot, and reporting anything you find in the comments, if you like.</p>
<p>Cheers!  </p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2010/04/29/my-zsh-irssi-and-screen-themes-on-white-and-black-backgrounds/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Irssi Handling JOINS/PARTS/QUITS</title>
		<link>http://pthree.org/2010/03/12/irssi-handling-joinspartsquits/</link>
		<comments>http://pthree.org/2010/03/12/irssi-handling-joinspartsquits/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 04:46:09 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1326</guid>
		<description><![CDATA[Irssi, as blogged extensively throughout this site, is one solid client. The flexibility never ceases to amaze me, and tonight was one of those times. Hanging out in the amount of channels I do, I see a lot of activity in my statusbar for all of my joined channels. This can be overwhelming for some, [...]]]></description>
			<content:encoded><![CDATA[<p>Irssi, as blogged extensively throughout this site, is one solid client. The flexibility never ceases to amaze me, and tonight was one of those times.</p>
<p>Hanging out in the amount of channels I do, I see a lot of activity in my statusbar for all of my joined channels. This can be overwhelming for some, but I don&#8217;t mind it. What I do mind, however, is when I check in on a specific channel, and see pages and pages of scrollback that is nothing more than people joining and leaving the channel. I&#8217;ve tried blatantly ignoring JOINS, PARTS and QUITS, as they&#8217;re called, but I always disable it, because I usually want to be kept abreast of when someone leaves a channel that I&#8217;m having a conversation with. I don&#8217;t want to look silly continuing to chat to someone, long after they&#8217;ve left. So, I need a way to keep on top of when people are joining and leaving the channel, but not have that information in the channel itself. Thankfully, Irssi meets this need.</p>
<p>The concept is simple. A JOIN, PART or QUIT is what is referred to as a &#8220;level&#8221;. There are a number of different levels that Irssi supports, all of which can be found with &#8220;/help levels&#8221; in Irssi. With Irssi, it is possible to ignore, or even redirect, levels. In my case, I want to redirect these three levels to another window, if possible. So, digging through the settings in Irssi, I found &#8220;window_check_level_first&#8221;. By default, this setting is &#8220;OFF&#8221;, which means that Irssi has a global setting for levels, and how they&#8217;re handled. Enabling this setting, means to follow the levels that have been assigned to their respective channels. However, if you turn this on first, without doing some initial setup before hand, you&#8217;ll notice everything going to your status window by default, including chat. This isn&#8217;t what we want, so let&#8217;s get setup.</p>
<p>The first thing we need to do is set our levels for all of our currently open windows, as well as any future windows that we open. We can accomplish this with two commands in Irssi:</p>
<pre>/foreach window /window level ALL -JOINS -PARTS -QUITS
/set window_default ALL -JOINS -PARTS -QUITS</pre>
<p>Now, the next thing to do is to create a new hidden window that will be the new home for all your JOINS, PARTS and QUITS. So, from Irssi:</p>
<pre>/window new HIDDEN</pre>
<p>Navigate to that window, wherever it is placed, and give it a name. For me, I called it &#8220;junk&#8221;. Of course, this isn&#8217;t necessary, just optional, but I prefer that each of my windows have a name:</p>
<pre>/window name junk</pre>
<p>It will have picked up the -JOINS -PARTS -QUITS from our default setting we just applied, so we&#8217;ll need to reverse that. Easiest way is to just apply the converse of what you did earlier:</p>
<pre>/window level -ALL JOINS PARTS QUITS</pre>
<p>Sweet. Our window is finished. Now, we can turn on the setting that will tell Irssi to look for each individual window level setting:</p>
<pre>/set window_check_level_first ON</pre>
<p>Wait a bit, and you should see all the JOINS, PARTS and QUITS going to your new hidden window, rather than each respective channel. You&#8217;ll also notice that it doesn&#8217;t print the channel where these are originating. I don&#8217;t know of an easy way to set that without a script, so if you know of such a script that exists, or want to write one yourself, sharing that would be appreciated. In the meantime, this is better than nothing.</p>
<p>Don&#8217;t forget to save:</p>
<pre>/save</pre>
<p>Also, you may not want to make your &#8220;junk&#8221; window hidden, but rather make it sticky, and split Irssi, putting the junk window on the top. I&#8217;ve done this with my highlight window, so it would make sense here. In that case, just:</p>
<pre>/window stick on
/window show (number|name)</pre>
<p>You can then size the window as needed if you decide you split your Irssi.</p>
<p>And, there you have it. Now, when people are joining and quitting, rather than filling your scrollback where precious chat exists, it&#8217;s all being forwarded to a window of your choice. If eventually, you like this setup, and you find that you&#8217;re not checking your junk window for joins and quits, then you may be able to get away with just ignoring JOINS, PARTS and QUITS altogether Irssi-wide. Which means, if for any reason you want to reverse this setup, it&#8217;s rather trivial:</p>
<pre>/set window_check_level_first OFF
/foreach window /window level ALL
/set window_default_level ALL
/window close
/save</pre>
<p>And that would back you out of this configuration, and get you back to default.</p>
<p>I should mention that I&#8217;ve heard that WeeChat has a feature that only people you&#8217;ve recently chatted with will show when they quit, or there is a setting for setting this. I personally think WeeChat is a solid client. However, in this case, I don&#8217;t want to see any quits, even with those I&#8217;m chatting with, in that buffer. However, I would like to see it in another buffer, and Irssi makes this painless. So, while I&#8217;m sure WeeChat can also meet similar needs, Irssi meets my needs best.</p>
<p>As with my other Irssi tutorials, I hope this one was helpful. I find that I personally benefit from my own writing, and that&#8217;s the major reason why I blog. I have searched for doing solving problems in the past, only to stumble upon my own blog post, outlining the very issue I&#8217;m faced with again. So, if it won&#8217;t benefit you, at least it will benefit myself.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2010/03/12/irssi-handling-joinspartsquits/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Facebook Chat In Bitlbee</title>
		<link>http://pthree.org/2010/02/13/facebook-chat-in-bitlbee/</link>
		<comments>http://pthree.org/2010/02/13/facebook-chat-in-bitlbee/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 08:22:24 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1306</guid>
		<description><![CDATA[It&#8217;s no surprise that Bitlbee is my chat client of choice. After all, I&#8217;ve blogged about it before. So, when I heard rumors that Facebook would be releasing their chat to outside clients over XMPP, I was excited to see the day when I could add it to my running Bitlbee instance. Lo and behold, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s no surprise that Bitlbee is my chat client of choice. After all, I&#8217;ve blogged about it before. So, when I heard rumors that Facebook would be releasing their chat to outside clients over XMPP, I was excited to see the day when I could add it to my running Bitlbee instance. <a href="http://www.facebook.com/sitetour/chat.php">Lo and behold, that day has come</a>.</p>
<p>Adding your Facebook account to Bitlbee is rather painless, as it is with any other account. The only catch, is you have to have a <a href="http://www.facebook.com/username/">Facebook username</a> set before you can continue. Once that is set, in Bitlbee, from your &#8220;&#038;btilbee&#8221; status window, you can add the account:</p>
<pre>account add jabber &lt;username&gt;@chat.facebook.com &lt;password&gt;
save
account on</pre>
<p>That&#8217;s it! You should be up and running with a new XMPP connection to the Facebook chat. However, rather quickly, you&#8217;ll notice that the usernames in your &#8220;blist&#8221; roster are their user identification number on Facebook, rather than their name. Something like &#8220;u123456789&#8243;. Who is that you wonder? Well, in your &#8220;&#038;bitlbee&#8221; window, you could run:</p>
<pre>info u123456789</pre>
<p>Then, using that information, you could rename them one-by-one as they login. However, this is a pain. Fortunately, if you&#8217;re running Bitlbee with Irssi, then there is an Irssi Perl script for renaming these automatically for you, as they login. <a href="http://browsingtheinternet.com/temp/bitlbee_rename.txt">You can find that script here</a>. Save it as &#8220;bitlbee_rename.pl&#8221; in your &#8220;~/.irssi/scripts directory, create a symlink in the autorun directory, load it, and you&#8217;re set. Here&#8217;s what you would do behind the command line:</p>
<pre>wget -O ~/.irssi/scripts/bitlbee_rename.pl http://browsingtheinternet.com/temp/bitlbee_rename.txt
ln -s ~/.irssi/scripts/bitlbee_rename.pl ~/.irssi/scripts/autorun/bitlbee_rename.pl</pre>
<p>Now in Irssi, load it:</p>
<pre>/RUN bitlbee_rename.pl</pre>
<p>Now, each of your Facebook buddies will have their user ID number renamed to &#8220;FirstnameLastname&#8221; format. The script only works for Facebook chat, so no worries about it mucking up other XMPP connections, and it only renames buddies that haven&#8217;t already been renamed. It also saves it to your Bitlbee config (which is /var/lib/bitlbee/username.xml) every time it renames a buddy.</p>
<p>So, there you go. Bitlbee, XMPP and now Facebook, married together. What a beautiful relationship.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2010/02/13/facebook-chat-in-bitlbee/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Irssi&#8217;s /channel, /network, /server and /connect &#8211; What It Means</title>
		<link>http://pthree.org/2010/02/02/irssis-channel-network-server-and-connect-what-it-means/</link>
		<comments>http://pthree.org/2010/02/02/irssis-channel-network-server-and-connect-what-it-means/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 14:30:14 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1278</guid>
		<description><![CDATA[I have found, that since using Irssi, many people like to edit the config directly. This is a natural instinct that we have as hackers in general. Because configs are stored in plain text, such as our shell RC files, Apache configs and many more, we just intuitively reach for our editor, and start hacking [...]]]></description>
			<content:encoded><![CDATA[<p>I have found, that since using <a href="http://irssi.org">Irssi</a>, many people like to edit the config directly. This is a natural instinct that we have as hackers in general. Because configs are stored in plain text, such as our shell RC files, Apache configs and many more, we just intuitively reach for our editor, and start hacking away. Unfortunately, the Irssi config is anything but clean. It uses a noisy syntax that makes it easy to make mistakes, and as a result, lose settings in Irssi, or have a broken Irssi entirely.</p>
<p>When I used to teach system administrators for a living, I gave them the mantra that if you have a tool that can modify a config file, use the tool. The tool has most likely been tested for bugs, and will generate syntactically correct configs. Humans are error-prone, so editing a config by hand means setting yourself up for error and pain. For Irssi, the developers have put in rather extensive commands that can modify everything in the config directly, and there&#8217;s even an exhaustive documentation support structure behind those commands. So, there should be no reason to edit the Irssi config by hand.</p>
<p>To show this, in irssi, go to the status window, and type &#8220;/help&#8221;:</p>
<pre>/help
05:29 Irssi commands:
05:29 accept     disconnect  lastlog  op        script     unquery
05:29 action     echo        layout   oper      scrollback unsilence
05:29 admin      eval        links    otr       server     upgrade
05:29 alias      exec        list     part      servlist   uping
05:29 away       flushbuffer load     ping      set        uptime
05:29 ban        foreach     log      query     sethost    userhost
05:29 beep       format      lusers   quit      silence    ver
05:29 bind       hash        map      quote     squery     version
05:29 cat        help        me       rawlog    squit      voice
05:29 cd         hilight     mircdcc  recode    stats      wait
05:29 channel    ignore      mode     reconnect statusbar  wall
05:29 clear      info        motd     redraw    time       wallops
05:29 completion invite      msg      rehash    toggle     who
05:29 connect    ircnet      names    reload    topic      whois
05:29 ctcp       ison        nctcp    resize    trace      whowas
05:29 cycle      join        netsplit restart   ts         window
05:29 dcc        kick        network  rmreconns unalias
05:29 dehilight  kickban     nick     rmrejoins unban
05:29 deop       kill        note     rping     unignore
05:29 devoice    knock       notice   save      unload
05:29 die        knockout    notify   sconnect  unnotify   </pre>
<p>So, long story short, don&#8217;t edit the config. Use the commands, and learn the help system. With that out of the way, let&#8217;s begin.</p>
<p>I&#8217;ve encountered many who are using Irssi that don&#8217;t understand how a few key commands relate with each other and how to tie them in. So, I would like to cover those commands here, namely: /channel, /network, /server and /connect. Hopefully, by the end of this post, not only will you be comfortable enough with the commands I&#8217;ve taught you about, but you&#8217;ll be comfortable enough to use the built-in documentation should you be stuck.</p>
<p><strong>/network</strong><br />
The first command to learn is /network, because all the rest of the commands take advantage of it. So, we&#8217;ll start there. /network is used for defining some client-specific settings you want to apply when connecting to a server. These settings can include username, real name, nickname, usermodes and other goodies. Running &#8220;/help network&#8221; can show you everything it supports:</p>
<pre>05:32 NETWORK ADD [-nick &lt;nick&gt;] [-user &lt;user&gt;] [-realname &lt;name&gt;] [-host &lt;host&gt;] [-autosendcmd &lt;cmd&gt;] [-querychans &lt;count&gt;] [-whois &lt;count&gt;] [-msgs &lt;count&gt;] [-kicks &lt;count&gt;] [-modes &lt;count&gt;] [-cmdspeed &lt;ms&gt;] [-cmdmax &lt;count&gt;] &lt;name&gt;
05:32 NETWORK REMOVE &lt;network&gt;
05:32
05:32      -kicks: Maximum number of nicks in one /KICK command
05:32      -msgs: Maximum number of nicks in one /MSG command
05:32      -modes: Maximum number of mode changes in one /MODE command
05:32      -whois: Maximum number of nicks in one /WHOIS command
05:32      -cmdspeed: Same as /SET cmd_queue_speed, see section 3.1
05:32      -cmdmax: Same as /SET cmds_max_at_once, see section 3.1
05:32      -nick, -user, -realname: Specify what nick/user/name to use
05:32      -host: Specify what host name to use, if you have multiple
05:32      -usermode: Specify what usermode to use on this network
05:32      -autosendcmd: Command to send after connecting to a server
05:32
05:32 With -autosendcmd argument you can automatically run any commands after connecting to network. This is useful for automatically identifying yourself to NickServ, for example
05:32
05:32 Shows and changes the settings of defined IRC networks.
05:32
05:32 See also: CONNECT
05:32
05:32 Irssi commands:
05:32 network add network list network remove </pre>
<p>So, let&#8217;s go ahead an define some networks. I personally connect to several networks simultaneously, all of which have different usermodes, and some which I need to provide authentication to when connecting. So, let&#8217;s say I wish to define client-specific connections to Freenode, OFTC and bitlbee. Let&#8217;s look at what to add. Oh, by the way, every command and option provided by Irssi can be tab-completed. Worth knowing to save some typing.</p>
<pre>/network add -user 88 -realname eightyeight -nick eightyeight -usermode +iw freenode
/network add -user 88 -realname eightyeight -nick eightyeight -usermode +w oftc
/network add -user aaron -realname "Aaron Toponce" -nick aaron -autosendcmd "say identify password" bitlbee</pre>
<p>As you can see, each network line is different. I&#8217;m using the same username, real name and nick for &#8220;freenode&#8221; and &#8220;oftc&#8221;, but different ones for &#8220;bitlbee&#8221;. I&#8217;ve specified different user modes with &#8220;freenode&#8221; and &#8220;oftc&#8221; where I haven&#8217;t provided any with &#8220;bitlbee&#8221;. Further, with &#8220;bitlbee&#8221;, I&#8217;m sending an identify command to the server when I connect. As you can probably imagine, this gives me great flexibility on how I want my client to interact with different servers.</p>
<p>Running &#8220;/network list&#8221; should show you the three servers you just added:</p>
<pre>/network list
05:48 Networks:
05:48 freenode: nick: eightyeight, username: 88, realname: eightyeight, usermode: +iw
05:48 bitlbee: nick: aaron, username: 88, realname: Aaron Toponce, autosendcmd: say identify password
05:48 oftc: nick: eightyeight, username: 88, realname: eightyeight, usermode: +w</pre>
<p>If you&#8217;ve just installed Irssi, you will likely find many networks already defined, including OFTC. If this is the case, and you want to make some adjustments to the OFTC definition, go ahead and provide those in the &#8220;/network add&#8221; command, and those options will be appended, provided the network name is the same. If you wish to remove any of the networks, then as you learned in the help doc, &#8220;/network remove name&#8221; is the syntax for that.</p>
<p>It&#8217;s important to note that at this stage of the game, any of the commands you enter in Irssi are only used for the current running session. If you wish to keep the settings persistent, then you will need to save it to disk (your config). You can do this with the &#8220;/save&#8221; command. I would recommend saving often when manipulating Irssi. Further, if for some reason you make a mistake in the command you&#8217;re typing, and you wish to revert back to the previous &#8220;/save&#8221; command, then you can use &#8220;/reload&#8221; for this purpsoe. &#8220;/reload&#8221; will read the config, and load the settings it finds there, ignoring any previous settings you&#8217;ve defined without saving.</p>
<p><strong>/channel</strong><br />
Now with our networks defined for our client settings, let&#8217;s define some channels to visit when we connect to these networks. So, in the status window, what does &#8220;/help channel&#8221; show?</p>
<pre>05:56 CHANNEL LIST
05:56 CHANNEL ADD [-auto | -noauto] [-bots &lt;masks&gt;] [-botcmd &lt;command&gt;] &lt;channel&gt; &lt;network&gt; [&lt;password&gt;]
05:56 CHANNEL REMOVE &lt;channel&gt; &lt;network&gt;
05:56
05:56 Irssi can automatically join to specified channels in specified IRC networks. It can also automatically send the password when manually joining to channel without specifying the password.
05:56
05:56 /CHANNEL ADD [-auto | -noauto] [-bots &lt;masks&gt;] [-botcmd &lt;command&gt;]
05:56              &lt;channel&gt; &lt;network&gt; [&lt;password&gt;]
05:56
05:56 With -bots and -botcmd arguments you can automatically send commands to someone in channel. This is useful for automatically getting ops for channels, for example
05:56
05:56 /CHANNEL ADD -auto -bots "*!bot@bothost.org bot*!*@host2.org"
05:56              -botcmd "msg $0 op mypass" #channel ircnet
05:56
05:56 You can also use the -botcmd without -bots argument. The command is then sent whenever you join the channel.
05:56
05:56 If you want to remove some settings from existing channel record, for example bots, just give the -bots "" parameters to it. Password can be removed by setting it to - (or actually, "" works too).
05:56
05:56 You can remove the channels with /CHANNEL REMOVE &lt;channel&gt; &lt;network&gt;
05:56
05:56 /CHANNEL LIST displays list of channels with settings.
05:56
05:56 /CHANNEL without any arguments displays list of channels you have joined. You can also use /CHANNEL to join to channels just as with /JOIN, like /CHANNEL #a.
05:56
05:56 See also: TS, JOIN
05:56
05:56 Irssi commands:
05:56 channel add channel list channel remove </pre>
<p>As you can clearly see with &#8220;/channel&#8221;, we can define what channels to join, and if any, what bot commands to send to the channel when we join. Each channel we join will be based on the network that we&#8217;ve previously defined. So, I could join #ubuntu whenever I connect to the Freenode network and #debian whenever I connect to the OFTC network. As with &#8220;/network&#8221;, on a fresh install of Irssi, there may already be a couple channels defined. Feel free to keep them in play when using Irssi, or remove them with &#8220;/channel remove&#8221; as per the syntax in the help doc.</p>
<p>So, let&#8217;s define some channels:</p>
<pre>/channel add -auto #ubuntu freenode
/channel add -auto #freenode freenode
/channel add -auto #debian oftc
/channel add -auto #bitlbee oftc</pre>
<p>Pretty straight forward, right? I&#8217;ve added four channels, two on the &#8220;freenode&#8221; network and two on the &#8220;oftc&#8221; network. Because Bitlbee doesn&#8217;t handle &#8220;channels&#8221; necessarily the same way IRC servers do, I haven&#8217;t defined any channels to join when I connect to Bitlbee. Notice I&#8217;m passing the &#8220;-auto&#8221; switch, so when I join that network, I&#8217;ll automatically join those channels. This is entirely optional, and &#8220;-noauto&#8221; is default if &#8220;-auto&#8221; isn&#8217;t passed.</p>
<p>As with &#8220;/network&#8221;, you can append settings to each channel listing as needed, as long as the channel name and network name are the same. If you wish to remove some settings, then you&#8217;ll need to &#8220;/channel remove&#8221; and &#8220;/channel add&#8221; as appropriate. Running &#8220;/channel list&#8221; should show our progress thus far:</p>
<pre>/channel list
06:05 Channel         Network    Password   Settings
06:05 #ubuntu         freenode              autojoin
06:05 #freenode       freenode              autojoin
06:05 #debian         oftc                  autojoin
06:05 #bitlbee        oftc                  autojoin</pre>
<p>Again, you should run &#8220;/save&#8221; when you&#8217;ve defined your channels, so next time you start Irssi, your settings won&#8217;t be lost.</p>
<p>One last related note about your channels. For me, I get very used to the location, or layout, of my channels. When I lose my running Irssi connection, for whatever reason, nothing is more frustrating than the channels being in a different order than previous. Fortunately, I&#8217;m not the only one that this annoys, so the developers have provided &#8220;/layout save&#8221; as a way to keep my sanity. &#8220;/layout save&#8221; will save the location order of your channel windows, so should you join a channel again, it will go to the same location as it was in previously. However, as with every other command in Irssi, this will only save it to your currently running session in RAM. If you wish to keep it persistent, you must issue &#8220;/save&#8221; for the next time you start Irssi.</p>
<p><strong>/server</strong><br />
At this point, we&#8217;re ready to connect. We have all the details out of the way, and we could easily just connect to Freenode or OFTC. However, we may want to pass some server-side options to the networks, such as connecting via SSL. So, before covering &#8220;/connect&#8221;, let&#8217;s get &#8220;/server&#8221; out of the way, as it&#8217;s the last command in this post that does any saving to disk, then we&#8217;ll play with &#8220;/connect&#8221;. As is verbatim in this post, let us pull up the help doc:</p>
<pre>06:24 SERVER [-4 | -6] [-ssl] [-ssl_cert &lt;cert&gt;] [-ssl_pkey &lt;pkey&gt;] [-ssl_verify] [-ssl_cafile &lt;cafile&gt;] [-ssl_capath &lt;capath&gt;] [-noproxy] [-network &lt;network&gt;] [-host &lt;hostname&gt;] [-rawlog &lt;file&gt;] [+]&lt;address&gt;|&lt;chatnet&gt; [&lt;port&gt; [&lt;password&gt;
             [&lt;nick&gt;]]]
06:24 SERVER PURGE [&lt;target&gt;]
06:24 SERVER REMOVE &lt;address&gt; [&lt;port&gt;]
06:24 SERVER ADD [-4 | -6] [-ssl] [-ssl_cert &lt;cert&gt;] [-ssl_pkey &lt;pkey&gt;] [-ssl_verify] [-ssl_cafile &lt;cafile&gt;] [-ssl_capath &lt;capath&gt;] [-auto | -noauto] [-network &lt;network&gt;] [-host &lt;hostname&gt;] [-cmdspeed &lt;ms&gt;] [-cmdmax &lt;count&gt;] [-port
                 &lt;port&gt;] &lt;address&gt; [&lt;port&gt; [&lt;password&gt;]]
06:24 SERVER LIST
06:24
06:24      -4, -6: specify explicitly whether to use IPv4 or IPv6 address
06:24      -ssl: use SSL when connecting
06:24      -ssl_cert: The SSL client certificate file (implies -ssl)
06:24      -ssl_pkey: The SSL client private key (if not included in the certificate file)
06:24      -ssl_verify: Verify servers SSL certificate
06:24      -ssl_cafile: File with list of CA certificates (implies -ssl_verify)
06:24      -ssl_capath: Directory with CA certificates (implies -ssl_verify)
06:24      -noproxy: Ignore the global proxy configuration for this server
06:24      -auto: Automatically connect to server at startup
06:24      -noauto: Don't connect to server at startup (default)
06:24      -network: Specify what IRC network this server belongs to
06:24      -ircnet: Same as -network. Deprecated. Do not use
06:24      -host: Specify what host name to use, if you have multiple
06:24      -!: don't autojoin channels
06:24      -cmdspeed: Same as /SET cmd_queue_speed, see section 3.1
06:24      -cmdmax: Same as /SET cmds_max_at_once, see section 3.1
06:24      -port: Use this only to edit the port number of an existing server,
06:24             for new servers use the &lt;port&gt; argument
06:24
06:24 /SERVER disconnects the server in active window and connects to the new one. It will take the same arguments as /CONNECT. If you prefix the address with the + character, Irssi won't disconnect the active server, and it will create a
      new window where the server is connected (ie. /window new hide; /connect address)
06:24
06:24 /SERVER without any arguments displays the list of connected
06:24         servers.
06:24
06:24 /SERVER REMOVE &lt;address&gt; [&lt;port&gt;]
06:24
06:24 /SERVER LIST
06:24
06:24 /SERVER PURGE [&lt;target&gt;]
06:24
06:24 Clears the server send queue. Useful if, for example, you accidentally paste lots of text to a channel.
06:24
06:24 See also: CONNECT, DISCONNECT, RECONNECT, RMRECONNS
06:24
06:24 Irssi commands:
06:24 server add server connect server list server purge server remove </pre>
<p>As should be obvious, this help doc is rather verbose. There are a lot of options that you can send server-side, such as using IPV4 or IPV6, connecting via SSL, changing the connecting port, and a myriad of other options. Let&#8217;s pick on just a few, and I&#8217;ll let you examine the rest.</p>
<p>Just the other day, I posted on <a href="http://pthree.org/2010/01/31/freenode-ssl-and-sasl-authentication-with-irssi/">how to connect to Freenode using SSL</a>, and yesterday <a href="http://pthree.org/2010/02/01/oftc-ssl-nickserv-and-irssi/">I covered connecting to OFTC</a> in a similar manner. Let&#8217;s take those &#8220;/server&#8221; strings, along with one for Bitlbee to define how I wish to connect to these servers. As with the previous commands, the syntax is &#8220;/server add&#8221;, as the help doc mentions:</p>
<pre>/server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network freenode irc.freenode.net 7000
/server add -auto -ssl -ssl_cert ~/.irssi/certs/nick.pem -ssl_verify -ssl_cafile /etc/ssl/certs/spi-cacert-2008.pem -network oftc irc.oftc.net 6697
/server add -auto -network bitlbee localhost</pre>
<p>As you can see, I&#8217;m using SSL for the Freenode and OFTC connections, but not for bitlbee. Further, I&#8217;m specifying &#8220;-ssl_cert&#8221; with OFTC to present my self-signed certificate to NickServ, which I&#8217;m not doing to the others and I&#8217;m using a specific CA certificate to verify the OFTC SSL cert, whereas with Freenode, I&#8217;m specifying a whole CA path, and letting it choose the appropriate CA certificate for verification. Lastly, with all three connections, I&#8217;m automatically connecting to the networks, so when I launch up Irssi, it begins connecting right away. Because there are channels with &#8220;-auto&#8221; added to them, when the server connection is successful, I&#8217;ll join those channels right away, and my session will be ready to go without any interaction from me.</p>
<p>If I wish to see the listing of servers I just added &#8220;/server list&#8221;, as per the documentation, will show me that list. Again, on a fresh install, there may be more servers than what we have added here, and you can keep them in play, or remove them as needed. If OFTC is already defined in the server list, then you can make changes to the listing as long as the port number, network name, and server url are the same. If there are settings you wish to remove, then you&#8217;ll need to &#8220;/server remove&#8221; and re-add as appropriate.</p>
<p>So, what does our listing show us:</p>
<pre>/server list
06:50 Server               Port  Network    Settings
06:50 irc.freenode.net     7000  freenode   autoconnect, ssl, ssl_verify, ssl_capath: /etc/ssl/certs
06:50 irc.oftc.net         6697  oftc       autoconnect, ssl, ssl_cert: ~/.irssi/certs/nick.pem, ssl_verify, ssl_cafile: /etc/ssl/certs/spi-cacert-2008.pem
06:50 localhost            6667  bitlbee    autoconnect</pre>
<p>As you can quickly see, where we specified ports for Freenode and OFTC, we didn&#8217;t for Bitlbee, so the default IRC port 6667 was added. Of course, don&#8217;t forget to &#8220;/save&#8221;, so you don&#8217;t lose your work up to this point.</p>
<p>A cautious word about &#8220;/server&#8221;. &#8220;/server&#8221; is used for defining server connections, not for connecting to servers themselves. However, it can connect you to a server should you say something of the effect to &#8220;/server irc.mozilla.org&#8221;. If you did this, it will disconnect you from your current connections, and ONLY connect to you irc.mozilla.org. This is an unfortunate side-effect that many first time Irssi users discover. The proper method for connecting to irc.mozilla.org is to use &#8220;/connect irc.mozilla.org&#8221;, as we&#8217;ll discuss below.</p>
<p><strong>/connect</strong><br />
Our last command that I plan on covering in this post. With our networks defined and our servers and channels configured, we could easily at this point connect to Freenode, and all of our settings that we&#8217;ve set at this point would be applied, which means it will save us SERIOUS amounts of typing in the future, provided you don&#8217;t keep setting up Irssi over and over. Let&#8217;s first look at the help doc, as we did with the other commands, then we&#8217;ll see how simple our life is from here on out.</p>
<pre>/help connect
06:58 CONNECT [-4 | -6] [-ssl] [-ssl_cert &lt;cert&gt;] [-ssl_pkey &lt;pkey&gt;] [-ssl_verify] [-ssl_cafile &lt;cafile&gt;] [-ssl_capath &lt;capath&gt;] [-noproxy] [-network &lt;network&gt;] [-host &lt;hostname&gt;] [-rawlog &lt;file&gt;] &lt;address&gt;|&lt;chatnet&gt; [&lt;port&gt; [&lt;password&gt;
              [&lt;nick&gt;]]]
06:58
06:58      -4, -6: specify explicitly whether to use IPv4 or IPv6 address
06:58      -ssl: use SSL when connecting
06:58      -ssl_cert: The SSL client certificate file (implies -ssl)
06:58      -ssl_pkey: The SSL client private key (if not included in the certificate file)
06:58      -ssl_verify: Verify servers SSL certificate
06:58      -ssl_cafile: File with list of CA certificates (implies -ssl_verify)
06:58      -ssl_capath: Directory with CA certificates (implies -ssl_verify)
06:58      -network: the network this connection belongs to
06:58      -ircnet: Same as -network. Deprecated. Do not use.
06:58      -host: the host
06:58      -!: don't autojoin channels
06:58      -rawlog: immediately open rawlog after connected
06:58
06:58 This command makes irssi to connect to specified server. Current connections are kept and a new one is created.
06:58
06:58 See also: SERVER, DISCONNECT, RMRECONNS, SCONNECT</pre>
<p>Obviously, &#8220;/connect&#8221; is verbose, but not as verbose as &#8220;/server&#8221;. Further, the first thing to note about &#8220;/connect&#8221; is there is nothing to save. This command just takes the settings you&#8217;ve already defined for your networks, and applies them in to the connection string. However, should you not have a defined network or server to connect to, such as maybe connecting to irc.mozilla.org, you can use many of the settings in &#8220;/server&#8221; here, such as IPV4, IPV6, SSL and so on. So, say I&#8217;m wishing to test an IPV6 connection to irc.mozilla.org, I could issue something like the following:</p>
<pre>/connect -6 irc.mozilla.org</pre>
<p>That&#8217;s it! If it succeeds, then maybe I can add it to my server list with &#8220;/server add&#8221;, as discussed above and &#8220;/save&#8221; to the config. Maybe I want to test SSL over IPV6 on that network on a specific port. I could do this. Further, because I&#8217;ve already defined my networks, I can say something like:</p>
<pre>/connect freenode</pre>
<p>In this case, I&#8217;ll apply all the network settings AND server settings for the &#8220;freenode&#8221; connection. This keeps me from typing it over and over every time I wish to connect. Further, the network names themselves can be tab completed! Oh, how this makes life much more enjoyable!</p>
<p>At the end of the help document, you&#8217;ll notice a couple of additional commands. Namely &#8220;/disconnect&#8221; and &#8220;/rmreconns&#8221;. If you&#8217;re finished with a network, and wish to disconnect, then &#8220;/disconnect&#8221; would be what you want. For example, maybe you&#8217;re satisfied with your testing of IPV6 over SSL on irc.mozilla.org. Then, from your status window, you will need to tell Irssi that this is the connection you wish to disconnect. To do this, &#8220;^x&#8221; (control-x) will switch you servers until you reach the right one. Then, when you&#8217;ve switched to the right server you could issue:</p>
<pre>/disconnect</pre>
<p>Further, maybe a &#8220;/connect&#8221; isn&#8217;t working. Maybe you&#8217;re trying to reach a host that is currently down, it&#8217;s timing out, or the server on a different port than what you specified. As a result, Irssi won&#8217;t be able to connect to your preferred server, but it will keep trying. Eventually, maybe the host will become responsive, and a connection can be made. Maybe not. Regardless, Irssi will keep trying your &#8220;/connect&#8221; one way or the other. This might be undesirable, so running &#8220;/rmreconns&#8221; will remove any reconnections that Irssi is attempting to make. As with every other Irssi command, &#8220;/disconnect&#8221; and &#8220;/rmreconns&#8221; have a help doc.</p>
<p><strong>Conclusion</strong><br />
So, that&#8217;s it. I hope this was helpful. If it was just noise, or much of it was confusing, I hope you walk away from this tutorial with at least two things:</p>
<ol>
<li>/help</li>
<li>/save</li>
</ol>
<p>If you can get those two commands deeply cemented in your brain, then you&#8217;ll be okay navigating Irssi and learning its ins and outs. Further, while there might be nothing technically wrong with editing the config by hand, Irssi provides powerful, powerful tools that can do it for you keeping the errors out, and the documentation for those tools, while not perfect, is vast and very complete. But, hopefully, you see now the relationship between &#8220;/network&#8221;, &#8220;/server&#8221;, &#8220;/connect&#8221; and &#8220;/channel&#8221;, and how you can tap into that power to make your Irssi experience more pleasurable.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2010/02/02/irssis-channel-network-server-and-connect-what-it-means/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OFTC, SSL, NickServ and Irssi</title>
		<link>http://pthree.org/2010/02/01/oftc-ssl-nickserv-and-irssi/</link>
		<comments>http://pthree.org/2010/02/01/oftc-ssl-nickserv-and-irssi/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 12:30:10 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1267</guid>
		<description><![CDATA[I&#8217;m on a bit of an IRC kick with the blogging lately, mainly because it seems I&#8217;m usually fine tuning my settings, and I like to share what I find. Hopefully, someone finds these posts useful. For today&#8217;s post, I&#8217;ve picked setting up an SSL connection on OFTC and securely identifying to NickServ when connecting. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m on a bit of an IRC kick with the blogging lately, mainly because it seems I&#8217;m usually fine tuning my settings, and I like to share what I find. Hopefully, someone finds these posts useful. For today&#8217;s post, I&#8217;ve picked setting up an SSL connection on <a href="http://oftc.net">OFTC</a> and securely identifying to NickServ when connecting. with <a href="http://irssi.org">Irssi</a>. Before beginning, it should be noted that the instructions for this tutorial <a href="http://www.oftc.net/oftc/NickServ/CertFP">can also be found on the OFTC site</a>. I&#8217;m merely taking that tutorial, and posting only the Irssi instructions here, more or less. However, if you use another client, you should read over that tutorial instead.</p>
<p><strong>Generating an OpenSSL Certificate</strong><br />
OFTC runs a forked version of hyperion-ircd that they call oftc-hybrid. It&#8217;s a patched version of hyperion that Freenode was running on their servers before the switch to ircd-seven. It supports IPV6, SSL, and CertFP with NickServ, that I&#8217;ll cover later in this post.</p>
<p>Before connecting to OFTC, we want to generate an OpenSSL certificate. This certificate will be used for authenticating to NickServ, and really isn&#8217;t related to setting up an SSL connection to OFTC. However, when you connect, you will be presenting OFTC with the generated certificate, and at that point, you will be able to add it to NickServ, because it&#8217;s been presented. If you already have your own personal certificate you want to use, then you can skip this step, and move on to connecting with SSL.</p>
<p>I&#8217;m going to assume you have OpenSSL installed. If you&#8217;re running any modern Unix-like operating system, such as GNU/Linux or one of the BSDs, chances are very high that it&#8217;s been installed by default. If not, install it, and continue with the rest of the post.</p>
<p>In this step, we&#8217;re going to generate our own self-signed personal OpenSSL certificate. So, fire up a terminal, type in the command below, and follow the on-screen instructions. The values you put here do not matter to OFTC in the least, so fill them in any way you wish. In my case, I&#8217;ll fill in the data for my personal certificate, but you fill in the values as you see fit. Replace &#8220;nick.key&#8221; and &#8220;nick.crt&#8221; with your IRC nick that you use for this connection.</p>
<pre>cd ~/.irssi
mkdir certs
cd certs
openssl req -nodes -newkey rsa:2048 -keyout nick.key -x509 -days 365 -out nick.crt
Generating a 2048 bit RSA private key
writing new private key to 'nick.key'
-----
Country Name (2 letter code) [US]:US
State or Province Name (full name) [Texas]:Utah
Locality Name (eg, city) [San Antonio]:Ogden
Organization Name (eg, company) [Stealth3]:eightyeight
Organizational Unit Name (eg, section) [ISP]:OFTC
Common Name (eg, YOUR name) []:Aaron Toponce
Email Address []:&#97;&#97;&#114;&#111;&#110;&#46;&#116;&#111;&#112;&#111;&#110;&#99;&#101;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;</pre>
<p>Now, if you look, you&#8217;ll have two newly generated files: &#8220;nick.key&#8221;, which is your private key and &#8220;nick.crt&#8221; which is your public self-signed certificate. Because &#8220;nick.key&#8221; is your private key, you want to guard it appropriately. Its permissions should be modified to only be readable (and maybe even writable) by you, and you alone. Also, because we have both the private and public key set, let&#8217;s go ahead and combine the files into one PEM file that we&#8217;ll present to NickServ when connecting:</p>
<pre>cat nick.crt nick.key > nick.pem
chmod 0400 nick.key nick.pem</pre>
<p><strong>Connecting with SSL</strong><br />
At this point, we are ready to connect to OFTC, and present our certificate to the server. So, fire up Irssi if you haven&#8217;t already:</p>
<pre>irssi -!</pre>
<p>Now that we&#8217;re in Irssi, we want to setup our SSL connections to OFTC. You should have ~/.irssi/certs/nick.pem available to send.</p>
<p>We will need to retrieve the CA certificate for verifying the server certificate. I personally like to put all my CA certificates in my certificates store, and this is where I deviate a little from the tutorial on the OFTC site. OFTC has their certificate signed by <a href="http://spi-inc.org">Software in the Public Interest</a>, so we&#8217;ll need their CA certificate. Fortunately, Debian, Ubuntu, and many other GNU/Linux operating systems provide this certificate for us, so we just need to identify the location of the certificate, and plug that into Irssi. If you don&#8217;t have that certificate, refer to the tutorial on the OFTC site for obtaining it and installing it on your system.</p>
<p>So, with Irssi waiting for our command, let&#8217;s tell it out to connect to OFTC:</p>
<pre>/network add oftc
/server add -auto -ssl -ssl_cert ~/.irssi/certs/nick.pem -ssl_verify -ssl_cafile /etc/ssl/certs/spi-cacert-2008.pem -network oftc irc.oftc.net 6697
/save
/connect oftc</pre>
<p>When we successfully connect, we should see that OFTC has accepted our self-signed certificate in the MOTD, and it should also show that we are connected securely to the network with SSL:</p>
<pre>16:20 [oftc] Irssi: Looking up irc.oftc.net
16:20 [oftc] Irssi: Connecting to irc.oftc.net [64.62.190.36] port 6697
16:20 [oftc] Irssi: Connection to irc.oftc.net established
16:20 [oftc] [charm.oftc.net]: *** Looking up your hostname...
16:20 [oftc] [charm.oftc.net]: *** Checking Ident
16:20 [oftc] [charm.oftc.net]: *** Found your hostname
16:20 [oftc] [charm.oftc.net]: *** No Ident response
16:20 [oftc] [charm.oftc.net]: *** Connected securely via TLSv1 AES256-SHA-256
16:20 [oftc] [charm.oftc.net]: *** Your client certificate fingerprint is 4A5463CE416649F72818B22945681D28250C1ACA
16:20 [oftc] >>> Welcome to the OFTC Internet Relay Chat Network eightyeight</pre>
<p>Sweet! We&#8217;re connected securely, and OFTC accepted my client certificate by printing the fingerprint for me. If the fingerprint is not displayed, then OFTC has not accepted my certificate, and I need to review the steps outlined above, or on their site.</p>
<p><strong>Authenticating to NickServ with SSL</strong><br />
From here on out, our connection is secured, and we can enjoy the safety that is encrypted packets. So, at this point, we need to register our nick with NickServ, if we haven&#8217;t already. It should be pointed out that Services has a complete help document provided. Messaging &#8220;help&#8221; to any of the Services bots will give you a break down of the available commands and their syntax. I would highly recommend becoming familiar with how to use the provided documentation.</p>
<pre>/msg NickServ help
04:22 [notice(NickServ!services@services.oftc.net)] *** NickServ Help ***
04:22 [notice(NickServ!services@services.oftc.net)] ACCESS: Maintains the nickname ACCESS list.
04:22 [notice(NickServ!services@services.oftc.net)] CERT: Maintains the nickname client certificate list.
04:22 [notice(NickServ!services@services.oftc.net)] DROP: Releases your nickname for use.
04:22 [notice(NickServ!services@services.oftc.net)] ENSLAVE: Enslave a nickname to this master nickname.
04:22 [notice(NickServ!services@services.oftc.net)] HELP: Shows this help.
04:22 [notice(NickServ!services@services.oftc.net)] IDENTIFY: Identify your nickname.
04:22 [notice(NickServ!services@services.oftc.net)] INFO: Get information on a nickname.
04:22 [notice(NickServ!services@services.oftc.net)] LINK: Link this nickname to a master nickname.
04:22 [notice(NickServ!services@services.oftc.net)] LIST: Shows a list of nicknames matching a specified pattern.
04:22 [notice(NickServ!services@services.oftc.net)] RECLAIM: Release your nickname for you to use.
04:22 [notice(NickServ!services@services.oftc.net)] REGAIN: Release your nickname for you to use.
04:22 [notice(NickServ!services@services.oftc.net)] REGISTER: Registers a nickname for your usage.
04:22 [notice(NickServ!services@services.oftc.net)] SENDPASS: Send a password reset request.
04:22 [notice(NickServ!services@services.oftc.net)] SET: Set nickname properties.
04:22 [notice(NickServ!services@services.oftc.net)] STATUS: Shows the identified status of a nickname
04:22 [notice(NickServ!services@services.oftc.net)] UNLINK: Unlink this nickname from a master nickname.
04:22 [notice(NickServ!services@services.oftc.net)] *** End of NickServ Help ***</pre>
<p>In this case, we&#8217;re interested in registering and then identifying. The syntax for registering is providing your password and email as arguments. Providing the correct email is key, so should you lose your password and you can no longer authenticate with SSL, you can have NickServ email you your password. So, I would recommend putting in a valid email here, and not some throw away string:</p>
<pre>/msg nickserv register password username@example.com
/msg nickserv identify password</pre>
<p>At this point, our nick is registered and we are identified to NickServ. If the nick you&#8217;re wishing to register is already registered, then you&#8217;ll either need to pick a different nick, or join #oftc on the network, and see if staff can assign that nick to you. At any event, you must be identified with a valid nick before you can proceed with the next steps.</p>
<p>Now that we are identified to NickServ, we need to add our hostmask to the access list. This is beneficial, so we won&#8217;t be asked to identify when we connect, which is what we want. So, we need to find our hostmask. This is simple enough by running a /WHOIS on yourself, and identifying your host string. So, it might be something like this:</p>
<pre>/WHOIS eightyeight
04:29 [oftc]      nick  | eightyeight
04:29 [oftc]      host  | ~88@c-12-130-240-233.hsd1.mn.comcast.net
04:29 [oftc]     gecos  | eightyeight
04:29 [oftc]    server  | charm.oftc.net [Freemont, CA, USA]
04:29 [oftc]      info  | user has identified to services
04:29 [oftc]  hostname  | 12.130.240.233
04:29 [oftc]      info  | is connected via SSL (secure link)
04:29 [oftc]      idle  | 0d 0h 1m 48s [signon: Sat Jan 30 16:20:12 2010]</pre>
<p>In this case, my host is &#8220;~88@c-12-130-240-233.hsd1.mn.comcast.net&#8221;. This is what I want to provide to NickServ:</p>
<pre>/msg nickserv access add *@c-12-130-240-233.hsd1.mn.comcast.net</pre>
<p>Good. Now we&#8217;re ready to add our self-signed certificate. Remember, when you connected, in the beginning of the MOTD, your certificate fingerprint was displayed. You will want to copy this output and paste it here. You can also use the &#8220;openssl&#8221; command to get the fingerprint of your cert, you will just need to remove the colons out of the string when providing it to NickServ. In my case, my fingerprint was 4A5463CE416649F72818B22945681D28250C1ACA, so I&#8217;m going to add that. Change the string for your fingerprint:</p>
<pre>/msg nickserv cert add 4A5463CE416649F72818B22945681D28250C1ACA</pre>
<p>That&#8217;s it! At this point, if you were to connect again (you must /disconnect and then /connect. /reconnect doesn&#8217;t apply the SSL settings, apparently (BUG?)), you will find that you will automatically identify to NickServ with your cert, and without a password. As you can imagine, this is highly secure. If you are not taking advantage of SSL, then your password can be sniffed on the wire, and your account could be compromised. In this case, we&#8217;re neglecting the password, and using public key cryptography instead to authenticate. I don&#8217;t know at this point if a MITM attack would be successful. So, bonus.</p>
<p>To see that it has succeeded, when you connect you should see the following at the end of the MOTD:</p>
<pre>05:14 [oftc2] >>> You have set user mode +i
05:14 [oftc2] >>> You have set user mode +R
05:14 [oftc2] [notice(NickServ!services@services.oftc.net)] You are connected using SSL and have provided a matching client certificate
05:14 [oftc2] [notice(NickServ!services@services.oftc.net)] for nickname eightyeight. You have been automatically identified.</pre>
<p><strong>Wrap-up</strong><br />
Congratulations! You are now connected securely to OFTC via SSL and you have identified to NickServ successfully with your self-signed certificate. The major benefits of this method, is you can ditch any client-side identification scripts, which is always a bonus. Further, your packets are now encrypted between you and the OFTC servers. OFTC also utilizes server-to-server encryption, so if you&#8217;re physically connected to a server in the United States, and someone you&#8217;re in private message with is physically connected to a server in Europe, not a single plaintext packet is sent on the wire between your client and his (assuming he&#8217;s connected via SSL as well).</p>
<p>A final not on SSL connections, is your computer clock that you are running Irssi on needs to be accurate. It would be recommended to use NTP to keep your clock in sync with Internet time servers. If your clock is too far off, you won&#8217;t be able to negotiate the OpenSSL handshake, and as a result, not be able to take advantage of the encrypted traffic. Also, OpenSSL certificates need to be valid. If your certificate expires, then you will not be able to present it to the server, and as a result, not be able to authenticate to NickServ. The dates on expiration are up to you, but validity is important. You can see the dates of your certificate with the following command:</p>
<pre>openssl x509 -noout -in nick.pem -dates</pre>
<p>Enjoy the security.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2010/02/01/oftc-ssl-nickserv-and-irssi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Freenode, SSL and SASL Authentication with Irssi</title>
		<link>http://pthree.org/2010/01/31/freenode-ssl-and-sasl-authentication-with-irssi/</link>
		<comments>http://pthree.org/2010/01/31/freenode-ssl-and-sasl-authentication-with-irssi/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 10:13:28 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1255</guid>
		<description><![CDATA[Last night, Freenode made the migration from hyperion-ircd to a fork of charybdis-ircd they&#8217;re calling ircd-seven. There are a few notable changes in the new ircd code that are worth mentioning here that are of benefit to end users and clients. They are the ability to use OpenSSL encryption between client and server and the [...]]]></description>
			<content:encoded><![CDATA[<p>Last night, <a href="http://freenode.net">Freenode</a> made the migration from hyperion-ircd to a fork of charybdis-ircd they&#8217;re calling ircd-seven. There are a few notable changes in the new ircd code that are worth mentioning here that are of benefit to end users and clients. They are the ability to use OpenSSL encryption between client and server and the ability to use SASL authentication for authenticating to Services. Of course, as is standard, I&#8217;ll document this with <a href="http://irssi.org">Irssi</a>, but the general rules apply to most IRC clients.</p>
<p><strong>Connecting with SSL</strong><br />
Freenode is listening for SSL connections on ports 6697, 7000 and 7070. I don&#8217;t know what the logic here is for that, but does it matter? A port is a port is a port. So, for Irssi, setting this up is rather simple.</p>
<pre>/server add -auto -ssl -network freenode irc.freenode.net 6697</pre>
<p>Boom! Done.</p>
<p>Now, if you want to verify the Freenode server SSL certificate against a certificate authority (CA), then you&#8217;ll need to download the CA certificate from the authority that signed the server certificate. In this case, its <a href="http://gandi.net">Gandi.net</a>, and their CA certificate file can be found here: <a href="http://crt.gandi.net/GandiStandardSSLCA.crt">http://crt.gandi.net/GandiStandardSSLCA.crt</a>. However, using the file in its native DER format for Irssi wasn&#8217;t working for me. So, using openssl, I converted the binary DER data file to PEM format, at which the Freenode certificate would properly verify:</p>
<pre>cd /usr/share/ca-certificates
mkdir gandi.net
cd gandi.net
wget http://crt.gandi.net/GandiStandardSSLCA.crt
openssl x509 -inform der -outform pem &lt; /usr/share/ca-certificates/gandi.net/GandiStandardSSLCA.crt &gt; GandiStandardSSLCA.pem
ln -s /usr/share/ca-certificates/gandi.net/GandiStandardSSLCA.pem /etc/ssl/certs/GandiStandardSSLCA.pem</pre>
<p>With the Gandi.net CA certificate installed in the standard CA certificates store, I modified my server string in Irssi:</p>
<pre>/server add -auto -ssl -ssl_cacert /etc/ssl/certs/GandiStandardSSLCA.pem -network freenode irc.freenode.net 6697</pre>
<p>Unfortunately, as much as I would like this to work, it doesn&#8217;t. I kept ending up with this error:</p>
<pre>[freenode] Irssi: Connecting to irc.freenode.net [140.211.166.4] port 7070
Irssi: warning Could not verify SSL servers certificate:
Irssi: warning   Subject : /OU=Domain Control Validated/OU=Gandi Standard Wildcard SSL/CN=*.freenode.net
Irssi: warning   Issuer  : /C=FR/O=GANDI SAS/CN=Gandi Standard SSL CA
Irssi: warning   MD5 Fingerprint : F8:40:2C:D9:D6:46:1F:D0:38:5D:ED:21:69:8B:17:C4</pre>
<p>Digging deeper, it appears it&#8217;s failing with:</p>
<pre>2 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: unable to get issuer certificate
the issuer certificate could not be found: this occurs if the issuer certificate of an untrusted certificate cannot be found.</pre>
<p>After a bit of hacking, and the help with Bazerka in #irssi, we found that my specific version of OpenSSL doesn&#8217;t like the certificate chain. Because Irssi is using these libraries, it took a bit of mucking about to find enough data points, that you need to be running an extremely recent SVN build of Irssi (there&#8217;s a bug with some SSL certificate verifications that affect us here), also with OpenSSL version 0.9.8k or later. I am not running either on Debian stable, so am I stuck not being able to verify the certificate Freenode gives me?</p>
<p>Well, not quite. The Gandi certificate is signed by UTN-USEFirst-Hardware, which in turn is signed by AddTrust External Root (if your browser has a CA certificates store, you can visit <a href="https://irc.freenode.net:7070">https://irc.freenode.net:7070</a>, and get the details of the certificate there, or use &#8220;openssl s_client&#8221; to download it and examine the details). So, if you have the USEFirst and AddTrust CA certificates, then you can verify those instead with older versions of OpenSSL or Irssi, and you&#8217;ll be golden. So, if you have a CA certificate store, as most GNU/Linux distributions do, you can set the following instead:</p>
<pre>/server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network freenode irc.freenode.net 6697</pre>
<p>This will succeed, and when connected, you&#8217;ll see usermode &#8220;+Z&#8221; meaning you&#8217;re using a secure connection, and you&#8217;ve properly verified the server certificate Freenode is handing out. Notice the difference with &#8220;-ssl_capath&#8221; here and &#8220;-ssl_cacert&#8221; from above. This is key to making this work.</p>
<p><strong>Authenticating with SASL</strong><br />
Okay, after setting up SSL with Freenode, the next task for me was using SASL authentication rather than a server password to authenticate to NickServ. It should be noted that using SASL authentication is entirely optional! You don&#8217;t have to use this method if you don&#8217;t want. However, using the SASL authentication script I&#8217;m going to point to in a second has one nice feature that might be of interest to you: using Blowfish encryption on your password, and sending that to NickServ, should you not be using an SSL connection at all. If you&#8217;re not interested in using an SSL connection, at least you can encrypt your password on the wire when authenticating using SASL.</p>
<p>Anyway, setting this up means getting Irssi in shape for SASL. By default. Irssi doesn&#8217;t support SASL authentication out of the box, so we need a Perl script to make it happen. <a href="http://freenode.net/sasl/cap_sasl.pl">You can find that Perl script here</a>. After downloading the script, put it in your ~/.irssi/scripts directory, and link against it in the autorun directory. Something like this:</p>
<pre>cd ~/.irssi/scripts/
wget http://freenode.net/sasl/cap_sasl.pl
cd autorun
ln -s ../cap_sasl.pl cap_sasl.pl</pre>
<p>Now, you just need to load it in Irssi, and setup your username and password for authentication. A word of note here: when setting up SASL authentication, you need to be using your primary nick with NickServ, not any nick that you&#8217;ve linked against, or it will fail. I don&#8217;t know why this is, but that&#8217;s the case. So, in my case, my primary nick is &#8220;atoponce&#8221; and my secondary nick is &#8220;eightyeight&#8221;. I use my secondary nick for all my IRC sessions, but when using the SASL command below, you must use your primary nick. While we&#8217;re at it, we&#8217;ll save everything we&#8217;ve done up to this point in the config:</p>
<pre>/RUN cap_sasl.pl
/sasl set freenode primary-nick password DH-BLOWFISH
/sasl save
/save</pre>
<p>First, if you haven&#8217;t noticed already, you need some Perl libraries in place before you can run this script, namely Blowfish, DH and BIGNUM. If you&#8217;re on Debian or Ubuntu, you can install them with:</p>
<pre>aptitude install libcrypt-blowfish-perl libcrypt-dh-perl libcrypt-openssl-bignum-perl</pre>
<p>Notice, I&#8221;m using DH-BLOWFISH in my example. &#8220;PLAIN&#8221; is also completely valid there for your mechanism. Also, notice I&#8217;m using &#8220;/sasl save&#8221; to save the settings to disk. You&#8217;ll want this, so should you need to restart Irssi, everything will be in place, and you won&#8217;t have to go through this procedure again.</p>
<p>If you&#8217;ve followed this tutorial rather closely, when you connect, you should see something like the following at the beginning of the connection:</p>
<pre>16:05 [freenode] Irssi: Looking up irc.freenode.net
16:05 [freenode] Irssi: Connecting to irc.freenode.net [140.211.166.4] port 6697
16:05 [freenode] Irssi: Connection to irc.freenode.net established
16:05 [freenode] [niven.freenode.net]: *** Looking up your hostname...
16:05 [freenode] [niven.freenode.net]: *** Checking Ident
16:05 [freenode] [niven.freenode.net]: *** Found your hostname
16:05 [freenode] [niven.freenode.net]: *** No Ident response
16:05 [freenode] Irssi: CLICAP: supported by server: identify-msg multi-prefix sasl
16:05 [freenode] Irssi: CLICAP: requesting: multi-prefix sasl
16:05 [freenode] Irssi: CLICAP: now enabled: multi-prefix sasl
16:05 [freenode] >>> eightyeight!88@oalug/member/pdpc.supporter.monthlybronze.eightyeight atoponce You are now logged in as atoponce.
16:05 [freenode] Irssi: SASL authentication successful
16:05 [freenode] >>> Welcome to the freenode Internet Relay Chat Network eightyeight</pre>
<p>You want to see &#8220;SASL authentication successful&#8221; in the output. If it fails then you will still need to provide your password manually to NickServ. You will likely need to review the steps outline above finding anything you might have missed. Remember, you&#8217;re authenticating with your primary NickServ nick, not any others linked to it. In the output, you can see I&#8217;m authenticating with &#8220;atoponce&#8221;, but using &#8220;eightyeight&#8221; when I actually connect.</p>
<p>One last work about SASL authentication: you no longer need a server password if you&#8217;re utilizing this. Before, Freenode supported a server password that you could append to the end of your &#8220;/server&#8221; string for authentication. Freenode still supports this, although in &#8220;username:password&#8221; syntax rather than just &#8220;password&#8221;. But, SASL authentication overrides the need for a server password, so you can take that out of your settings. It&#8217;s not hurting anything if you leave it, but it&#8217;s not doing anything beneficial either.</p>
<p><strong>Miscellaneous</strong><br />
With all that out of the way, I want to point out one major change that I welcome. That is the ability to join more than 20 channels simultaneously. Previously, with hyperion-ircd, you had to get Freenode staff to grant you usermode &#8220;+u&#8221; which gave you the ability to sit in more than 20 channels with one connection. If you&#8217;re an IRC addict like I am, 20 is pretty freaking limiting. However, ircd-seven now supports the ability to connect to 120 simultaneous channels. You can see this in the MOTD output when you connect (emphasis placed):</p>
<pre>16:05 [freenode] >>> CHANTYPES=# EXCEPTS INVEX CHANMODES=eIbq,k,flj,CFLMPQScgimnprstz <b>CHANLIMIT=#:120</b> PREFIX=(ov)@+ MAXLIST=bqeI:100 MODES=4 NETWORK=freenode KNOCK STATUSMSG=@+ CALLERID=g are supported by this server
16:05 [freenode] >>> SAFELIST ELIST=U CASEMAPPING=rfc1459 CHARSET=ascii NICKLEN=16 CHANNELLEN=50 TOPICLEN=390 ETRACE CPRIVMSG CNOTICE DEAF=D MONITOR=100 are supported by this server
16:05 [freenode] >>> FNC TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,PRIVMSG:4,NOTICE:4,ACCEPT:,MONITOR: EXTBAN=$,arx WHOX CLIENTVER=3.0 are supported by this server</pre>
<p>Very nice!</p>
<p>So, there you have it. SSL connectivity with SASL authentication and the ability to join up to 120 channels simultaneously on the new IRCD at Freenode. I personally welcome all these changes, and it&#8217;s nice to see that every IRC server I&#8217;m currently connected with provides a secure connection. Call me paranoid, but I&#8217;m enjoying SSL.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2010/01/31/freenode-ssl-and-sasl-authentication-with-irssi/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>hilight_win.pl for Irssi and Other Script Goodies</title>
		<link>http://pthree.org/2010/01/22/hilight_win-pl-for-irssi-and-other-script-goodies/</link>
		<comments>http://pthree.org/2010/01/22/hilight_win-pl-for-irssi-and-other-script-goodies/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 06:56:02 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1249</guid>
		<description><![CDATA[So, I was browsing A Guide to Effectively Using Screen and Irssi, and I came across this little gem: Hilight Window See the irssi screenshot above. The section labeled &#8220;1&#8243; is a split window called &#8220;hilight&#8221;. Anything that is hilighted (set using the /hilight command) will be logged to that window. To do this, first [...]]]></description>
			<content:encoded><![CDATA[<p>So, I was browsing <a href="http://quadpoint.org/articles/irssi">A Guide to Effectively Using Screen and Irssi</a>, and I came across <a href="http://quadpoint.org/articles/irssi#hilight_window">this little gem</a>:</p>
<blockquote><p><b>Hilight Window</b></p>
<p>See the irssi screenshot above. The section labeled &#8220;1&#8243; is a split window called &#8220;hilight&#8221;. Anything that is hilighted (set using the /hilight command) will be logged to that window.</p>
<p>To do this, first load the script. The script I use is a modified version of cras&#8217;s hilightwin.pl that logs timestamps as well. It is available here: <a href="http://static.quadpoint.org/irssi/hilightwin.pl">hilightwin.pl</a></p>
<p>Put the script in ~/.irssi/scripts/autorun/ and type /run autorun/hilightwin.pl in irssi.</p>
<p>Next, create the split window. This is done with the /window command. See /help window for details on how this works.</p>
<pre>  /window new split
  /window name hilight
  /window size 6</pre>
<p>The above commands will create a new split window (as opposed to a &#8220;hidden&#8221; window, which privmsg, channel, and status windows are by default), call it hilight (so the script knows where to send the information) with a height of 6 lines.</p>
<p>Now, have someone address you in a channel using &#8220;yournick: hello&#8221;. If you did everything correctly, it should be logged to the split window. If you want to have all lines containing your nick hilighted, type /hilight yournick. See /help hilight for advanced features. Use /layout save to save your layout settings and have irssi automatically recreate the split hilight window on startup.</p></blockquote>
<p>For me, irssi is more than just an IRC client. It&#8217;s a complete messaging center. I access IRC, Jabber and push to microblogging sites, such as Facebook, Identi.ca and others. Because I&#8217;m running behind GNU screen, I want to be aware of any messages while I&#8217;m away. Of course, Irssi does this for you automatically, by putting your hilights in the status window. For me, that&#8217;s a busy window, and it&#8217;s easy to lose hilights if they sit long enough. So, I&#8217;d rather have the hilgihts go to a separate window. Enter that script listed above, along with splitting the window for immediate access.</p>
<p>Now you have a split screen window that your highlighted messages are going to. However, they&#8217;re also going to your status window when you&#8217;re away. This is known as your &#8220;awaylog&#8221;. You can change that setting if you want. By default, it logs &#8216;msgs hilight&#8217;. If you want to disable it, now that you have a new hilight window, you can set:</p>
<pre>/set awaylog ""</pre>
<p>Note, that your new hilight window will only log hilights, not msgs. For me, this is no big deal, because msgs are already in their own window by default anyway, and the point of this is to keep all the messages in one place. So, this is a win/win for me.</p>
<p>Along with this script, there is other script goodness that I take advantage of with this fabulous client. Listed below:</p>
<ul>
<li><a href="http://github.com/msparks/irssiscripts/blob/a4983a5f21d35143389ab9cb6886e92a5529a833/anames.pl">anames.pl</a>- Query the server to see who is away and who is not by running /anames. Prints out a list similar to /anames, but gives those whore are marked as away a different brightness to their nick.</li>
<li><a href="http://scripts.irssi.org/scripts/il.pl">il.pl</a>- Because I&#8217;m a microblogging nerd, I like to know in my status bar how many characters I&#8217;ve currently typed before I hit enter, to know whether or not I&#8217;m under the 140 character limit. Works like a charm, character-by-character.</li>
<li><a href="http://scripts.irssi.org/scripts/trigger.pl">trigger.pl</a>- This script rocks! Allows me to do search and replace with text in my client. I use it mainly for the Identi.ca Jabber bot. See this post for more details.</li>
<li><a href="http://scripts.irssi.org/scripts/usercount.pl">usercount.pl</a>- You can put the number of people in a channel, including the number of ops, halfops, voices, etc in your status bar.</li>
<li><a href="http://scripts.irssi.org/scripts/trackbar.pl">trackbar.pl</a>- This puts a trackbar on your window where you last were in the conversation last time you were watching it. Very useful to pick back up where you left off in a conversation when you return to that window.</li>
<li><a href="http://scripts.irssi.org/scripts/screen_away.pl">screen_away.pl</a>- Using GNU screen is solid with irssi. However, when I am away, I want to mark myself away with the server. So, all I have to do is detach screen, and this script will mark me away with my configured away message. No public announcements either.</li>
</ul>
<p>Of course, I use a few others, such as the bitlbee scripts, but these are the heavy hitters. Must-haves for any serious irssi user/hacker.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2010/01/22/hilight_win-pl-for-irssi-and-other-script-goodies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More 88 Madcows</title>
		<link>http://pthree.org/2010/01/12/more-88-madcows/</link>
		<comments>http://pthree.org/2010/01/12/more-88-madcows/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 20:56:03 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=1245</guid>
		<description><![CDATA[I made some updates to my 88_madcows.theme file for irssi. The biggest change is the theme working with 0.8.13 and greater. Further, I added the server tag to the statusbar when in the status window, so when I need to change servers for whatever reason, it&#8217;s obvious what server I&#8217;m on before cycling through. Screenshot [...]]]></description>
			<content:encoded><![CDATA[<p>I made some updates to my <a href="http://pthree.org/2008/09/24/new-irssi-theme-88-madcows/">88_madcows.theme file for irssi</a>. The biggest change is the theme working with 0.8.13 and greater. Further, I added the server tag to the statusbar when in the status window, so when I need to change servers for whatever reason, it&#8217;s obvious what server I&#8217;m on before cycling through. <a href="http://picasaweb.google.com/lh/photo/rapJoD0SyZ7M0BRutW1rxw?feat=directlink">Screenshot here</a>, and the <a href="http://pthree.org/wp-content/uploads/2010/01/88_madcows.theme">theme file here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2010/01/12/more-88-madcows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A Browser And A Terminal</title>
		<link>http://pthree.org/2008/10/14/a-browser-and-a-terminal/</link>
		<comments>http://pthree.org/2008/10/14/a-browser-and-a-terminal/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 15:58:35 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=694</guid>
		<description><![CDATA[I&#8217;ve come to the conclusion that the only user space software needed on a Linux machine is a browser and a terminal. Everything else is bloat. I just discovered mutt, a fantastic email client. Well, technically, I didn&#8217;t &#8220;just discover it&#8221;, as I have played with it in the past, but never got far with [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve come to the conclusion that the only user space software needed on a Linux machine is a browser and a terminal. Everything else is bloat.</p>
<p>I just discovered mutt, a fantastic email client. Well, technically, I didn&#8217;t &#8220;just discover it&#8221;, as I have played with it in the past, but never got far with it. You see, configuring mutt is a royal pain. On top of that, mutt is just an MUA (mail user agent), and does not provide an MRA (mail retrieval agent) or MSA (mail sending agent). So, not only do you need to install and configure mutt, but you also need to install fetchmail and sendmail or similar. This certainly isn&#8217;t attractive to the average user.</p>
<p>On Helios now, it has become my messaging machine. It&#8217;s running the following:</p>
<ul>
<li>Irssi: The only IRC client you&#8217;ll ever need.
<ul>
<li>Bitlbee: An IRC to IM gateway used for Jabber. Running as an extension in Irssi.</li>
<li>Irssi-otr: An Off-The-Record plugin used for client-to-client encryption on any protocol.</li>
</ul>
</li>
<li>Mutt: The only mail client you&#8217;ll ever need.
<ul>
<li>Links2: Used in combination with mutt to dump HTML email to text, making HTML cruft readable</li>
</ul>
</li>
</ul>
<p>Now, that I have my email and instant messaging configured and running in a terminal, all I really need is a browser. I can execute any command from the terminal, so I don&#8217;t need menus, and although I could use links, or some other text-based browser, using a GUI browser is needed for viewing images, video, sound, and other multimedia (this could be argued as to whether or not we need those things- I&#8217;m not going to entertain that argument).</p>
<p>So, from where I&#8217;m sitting, I don&#8217;t need much on my computer, which makes me wonder why I&#8217;m running a full featured desktop like GNOME or KDE in the first place. It may be time to slim things back down to Openbox or Fluxbox.  Screenshots attached for your pleasure.</p>
<p><a href="http://pthree.org/wp-content/uploads/2008/10/irssi.png"><img src="http://pthree.org/wp-content/uploads/2008/10/irssi-300x187.png" alt="" title="irssi" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://pthree.org/wp-content/uploads/2008/10/mutt.png"><img src="http://pthree.org/wp-content/uploads/2008/10/mutt-300x187.png" alt="" title="mutt" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2008/10/14/a-browser-and-a-terminal/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>New Irssi Theme &#8211; 88_madcows</title>
		<link>http://pthree.org/2008/09/24/new-irssi-theme-88-madcows/</link>
		<comments>http://pthree.org/2008/09/24/new-irssi-theme-88-madcows/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 21:02:40 +0000</pubDate>
		<dc:creator>Aaron Toponce</dc:creator>
				<category><![CDATA[irssi]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://pthree.org/?p=687</guid>
		<description><![CDATA[Yesterday, while students were working on labs, and I was bored stiff, I decided to update my Irssi installation running on my Debian SPARC box. I spent some time cleaning up the config (not by hand, mind you, but through the options in the interface) by updating the servers I connect to, the channels I [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, while students were working on labs, and I was bored stiff, I decided to update my <a href="http://irssi.org">Irssi</a> installation running on my Debian SPARC box.  I spent some time cleaning up the config (not by hand, mind you, but through the options in the interface) by updating the servers I connect to, the channels I want to autojoin, the networks, updating aliases and scripts, and a number of other things.  Then, I realized it was time for a theme other than default.</p>
<p>I had run the <a href="http://irssi.org/themefiles/madcow.png">madcow theme</a> in the past, but I wasn&#8217;t happy with a few aspects of it.  For example, I didn&#8217;t like the nicks being right-aligned based on the last character of their nick.  Because of this, the developer of the the theme chose a max length for the nicks that meant cutting off any nicks that extended past that max.  Why not just left-align it to conserve space?  Also, there were aspects of the theme that didn&#8217;t tie in well with itself.  So, after several hours of hacking, I finally settled on my new theme.  It&#8217;s not a big departure from the madcow theme, as I loved the color scheme and much of the formatting, and wanted to keep it.  However, I also wanted to change what was driving me nuts about the theme.  Now, I&#8217;m no Irssi theme hacker, so I&#8217;m sure there are better ways to reach some of the formatting decisions that I made, but it&#8217;s working well, so I&#8217;m happy.</p>
<p>I decided to name the theme 88_madcows, after my IRC nick &#8216;eightyeight&#8217; and keeping homage to the madcow theme developed by dubkat.  Below is a screenshot of the theme in action.  If you would like to download it, I&#8217;ve provided a link as well.  I would recommend running the following commands in your Irssi for maximum theme integration (I have <a href="http://scripts.irssi.org/scripts/usercount.pl">usercount.pl</a>, <a href="http://scripts.irssi.org/scripts/trackbar.pl">trackbar.pl</a> and <a href="http://scripts.irssi.org/scripts/nicklist.pl">nicklist.pl</a> installed):</p>
<pre>/set hilight_color %g
/set hilight_act_color %R
/set trackbar_style %g</pre>
<p>Full 1680&#215;1050 <a href="http://pthree.org/wp-content/uploads/2008/09/88_madcows.png">screenshot here</a> (using the Tango color scheme in gnome-terminal).<br />
<a href="http://pthree.org/wp-content/uploads/2008/09/88_madcows.theme">Theme download here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pthree.org/2008/09/24/new-irssi-theme-88-madcows/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

