<?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>Gustavo Dutra &#187; irssi</title>
	<atom:link href="http://gustavodutra.com/tag/irssi/feed/" rel="self" type="application/rss+xml" />
	<link>http://gustavodutra.com</link>
	<description>Um pouco de tudo, nada de pouco</description>
	<lastBuildDate>Thu, 29 Jul 2010 22:57:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Acessando a freenode.org por SSL no Irssi</title>
		<link>http://gustavodutra.com/post/370/acessando-a-freenode-org-por-ssl-no-irssi/</link>
		<comments>http://gustavodutra.com/post/370/acessando-a-freenode-org-por-ssl-no-irssi/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 20:59:15 +0000</pubDate>
		<dc:creator>Gustavo Dutra</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Nerd]]></category>
		<category><![CDATA[Software Livre]]></category>
		<category><![CDATA[archlinux]]></category>
		<category><![CDATA[como]]></category>
		<category><![CDATA[dicas]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[irssi]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://gustavodutra.com/?p=370</guid>
		<description><![CDATA[Bom, recentemente a FreeNode.org adicionou suporte a conexões SSL. Não que eu faça questão, porém meu irssi perdia a conexão com o server. Fui para o google e decidi postar a dica de como resolvi o problema e habilitei a conexão SSL.

Primeiro, eu baixei um script que a própria FreeNode.org disponibiliza para o irssi, o [...]]]></description>
			<content:encoded><![CDATA[<p>Bom, recentemente a <a rel="nofollow" href="http://freenode.org">FreeNode.org</a> adicionou suporte a conexões SSL. Não que eu faça questão, porém meu <a rel="nofollow" href="http://irssi.org" rel="nofollow">irssi</a> perdia a conexão com o server. Fui para o google e decidi postar a dica de como resolvi o problema e habilitei a conexão SSL.</p>
<p><span id="more-370"></span></p>
<p>Primeiro, eu baixei um script que a própria <a rel="nofollow" href="http://freenode.org">FreeNode.org</a> disponibiliza para o irssi, o instalei e depois algumas dependências.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>.irssi<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>autorun <span style="color: #666666; font-style: italic;">#Se o diretório não existir, crie-o</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.freenode.net<span style="color: #000000; font-weight: bold;">/</span>sasl<span style="color: #000000; font-weight: bold;">/</span>cap_sasl.pl</pre></div></div>

<p>Como maioria das dependências não estavam nos repositórios oficiais do <a rel="nofollow" href="http://archlinux.org">Arch Linux</a> nem do <a rel="nofollow" href="http://aur.archlinux.org">AUR</a>, eu tive que as instalar separadamente e ai já aproveitei pra fazer um script de instalação com todas as dependências. Esse script funciona em qualquer distro. São necessários os seguintes módulos: <strong>Math::BigInt, Math::BigInt::FastCalc, Math::BigInt::GMP, Math::BigInt::Pari, Crypt::DH e Crypt::OpenSSL::BigNum</strong>.</p>
<p>Abra um novo arquivo e cole as linhas abaixo, será nosso script de instalação.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #007800;">packages</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span>Math-BigInt-<span style="color: #000000;">1.89</span> Math-BigInt-FastCalc-<span style="color: #000000;">0.19</span> Math-BigInt-GMP-<span style="color: #000000;">1.24</span> Math-BigInt-Pari-<span style="color: #000000;">1.13</span> Crypt-DH-<span style="color: #000000;">0.06</span> Crypt-OpenSSL-Bignum-<span style="color: #000000;">0.04</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cpan-comp
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>cpan-comp
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.cpan.org<span style="color: #000000; font-weight: bold;">/</span>authors<span style="color: #000000; font-weight: bold;">/</span>id<span style="color: #000000; font-weight: bold;">/</span>T<span style="color: #000000; font-weight: bold;">/</span>TE<span style="color: #000000; font-weight: bold;">/</span>TELS<span style="color: #000000; font-weight: bold;">/</span>math<span style="color: #000000; font-weight: bold;">/</span>Math-BigInt-1.89.tar.gz
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.cpan.org<span style="color: #000000; font-weight: bold;">/</span>authors<span style="color: #000000; font-weight: bold;">/</span>id<span style="color: #000000; font-weight: bold;">/</span>T<span style="color: #000000; font-weight: bold;">/</span>TE<span style="color: #000000; font-weight: bold;">/</span>TELS<span style="color: #000000; font-weight: bold;">/</span>math<span style="color: #000000; font-weight: bold;">/</span>Math-BigInt-FastCalc-0.19.tar.gz
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.cpan.org<span style="color: #000000; font-weight: bold;">/</span>authors<span style="color: #000000; font-weight: bold;">/</span>id<span style="color: #000000; font-weight: bold;">/</span>T<span style="color: #000000; font-weight: bold;">/</span>TE<span style="color: #000000; font-weight: bold;">/</span>TELS<span style="color: #000000; font-weight: bold;">/</span>math<span style="color: #000000; font-weight: bold;">/</span>Math-BigInt-GMP-1.24.tar.gz
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.cpan.org<span style="color: #000000; font-weight: bold;">/</span>authors<span style="color: #000000; font-weight: bold;">/</span>id<span style="color: #000000; font-weight: bold;">/</span>T<span style="color: #000000; font-weight: bold;">/</span>TE<span style="color: #000000; font-weight: bold;">/</span>TELS<span style="color: #000000; font-weight: bold;">/</span>math<span style="color: #000000; font-weight: bold;">/</span>Math-BigInt-Pari-1.13.tar.gz
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.cpan.org<span style="color: #000000; font-weight: bold;">/</span>authors<span style="color: #000000; font-weight: bold;">/</span>id<span style="color: #000000; font-weight: bold;">/</span>B<span style="color: #000000; font-weight: bold;">/</span>BT<span style="color: #000000; font-weight: bold;">/</span>BTROTT<span style="color: #000000; font-weight: bold;">/</span>Crypt-DH-0.06.tar.gz
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.cpan.org<span style="color: #000000; font-weight: bold;">/</span>authors<span style="color: #000000; font-weight: bold;">/</span>id<span style="color: #000000; font-weight: bold;">/</span>I<span style="color: #000000; font-weight: bold;">/</span>IR<span style="color: #000000; font-weight: bold;">/</span>IROBERTS<span style="color: #000000; font-weight: bold;">/</span>Crypt-OpenSSL-Bignum-0.04.tar.gz
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> pkg <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$packages</span>; <span style="color: #000000; font-weight: bold;">do</span>
	<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$pkg</span>.tar.gz&quot;</span> ;
	<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$pkg</span>&quot;</span> ;
	<span style="color: #c20cb9; font-weight: bold;">perl</span> Makefile.PL ;
	<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ;
	<span style="color: #7a0874; font-weight: bold;">cd</span> .. ;
<span style="color: #000000; font-weight: bold;">done</span>;</pre></div></div>

<p>OK, o <a rel="nofollow" href="http://garotosopa.wordpress.com/">garotosopa</a> tirou toda a graça do meu script, me alertando uma coisa da qual não sabia, para instalar um módulo do perl, basta digitar:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">cpan <span style="color: #660033;">-i</span> Math::BigInt Math::BigInt::FastCalc Math::BigInt::GMP Math::BigInt::Pari Crypt::DH Crypt::OpenSSL::Bignum</pre></div></div>

<p>Inicie o irssi e digite:</p>

<div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">/sasl set freenode Seu_nick Sua_Senha DH-BLOWFISH
/sasl save
/save
/quit</pre></div></div>

<p>Agora, é só ajeitar o config do irssi.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vim</span> ~<span style="color: #000000; font-weight: bold;">/</span>.irssi<span style="color: #000000; font-weight: bold;">/</span>config</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;">servers <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #009900;">&#123;</span>
		address <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;irc.freenode.org&quot;</span><span style="color: #339933;">;</span>
		chatnet <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;freenode&quot;</span><span style="color: #339933;">;</span>
		port <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;7000&quot;</span><span style="color: #339933;">;</span>
		use_ssl <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;yes&quot;</span><span style="color: #339933;">;</span>
		ssl_verify <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;yes&quot;</span><span style="color: #339933;">;</span>
		ssl_capath <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;/etc/ssl/certs&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Entre no irssi novamente e pronto! Só usar o /connect freenode !</p>
<p>E ai, gostou? </p>
]]></content:encoded>
			<wfw:commentRss>http://gustavodutra.com/post/370/acessando-a-freenode-org-por-ssl-no-irssi/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
