Robby on Rails: rbot is coolthoughts.sort_by{|t| t[:topic]}.collect tag:www.robbyonrails.com,2005:TypoTypo2006-09-05T22:12:48-04:00Robby Russellurn:uuid:fa8857af734aed588a84d402c1cafe552005-09-11T17:17:00-04:002006-09-05T22:12:48-04:00rbot is cool<p>This weekend, I found myself helping the <a href="http://www.pdxruby.org/">Portland Ruby Brigade</a> get setup with a <a href="http://lists.pdxruby.org/mailman/listinfo/pdxruby">new mailing list</a> and while in our <span class="caps">IRC</span> channel (<strong>#pdx.rb</strong> on freenode), I was reminded that we never setup a bot in the channel. So, I went and tried to get Eggdrop running but didn’t like that the configuration file is a whopping <strong>1342 lines long</strong>. Seriously… it’s long. I am a busy person right now and this was instantly a turn-off. So, i looked around for ruby based ones… found a few python ones and found <a href="http://linuxbrit.co.uk/rbot/">rbot</a></p>
<p>yes… a ruby-based irc bot!</p>
<p><span class="caps">SVN</span> checked it out… added the few deps and the configuration file…</p>
<div class="typocode"><pre><code class="typocode_ruby ">
<span class="punct">---</span>
<span class="ident">irc</span><span class="punct">.</span><span class="ident">nick</span><span class="punct">:</span> <span class="ident">pdxrbot</span>
<span class="ident">core</span><span class="punct">.</span><span class="ident">address_prefix</span><span class="punct">:</span>
<span class="punct">-</span> <span class="punct">"</span><span class="string">?</span><span class="punct">"</span>
<span class="ident">irc</span><span class="punct">.</span><span class="ident">user</span><span class="punct">:</span> <span class="ident">pdxruby</span>
<span class="ident">server</span><span class="punct">.</span><span class="ident">name</span><span class="punct">:</span> <span class="ident">irc</span><span class="punct">.</span><span class="ident">freenode</span><span class="punct">.</span><span class="ident">net</span>
<span class="ident">auth</span><span class="punct">.</span><span class="ident">password</span><span class="punct">:</span> <span class="punct">******</span>
<span class="ident">irc</span><span class="punct">.</span><span class="ident">join_channels</span><span class="punct">:</span>
<span class="punct">-</span> <span class="punct">"</span><span class="string">#pdx.rb</span><span class="punct">"</span>
</code></pre></div>
<p>Yes! <span class="caps">YAML</span>!</p>
<p>It ran right away…and I was sold. Nice work. (and only about 1330 lines less of configuration!)</p>
<p>So, it was up and running and then I looked at the plugins api. (<strong>huge grin</strong>)</p>
<p>I’ve added two plugins to the #pdx.rb bot already. One for rubyurl (uses shorturl) and one that shows the last 5 entry titles from the planet rubyonrails site. :-)</p>
<p>We’re already scheming how we’ll make it work with meeting reminders, subversion, and other random fun. I’m quite impressed so far.</p>
<p>Check it out <a href="http://linuxbrit.co.uk/rbot/">here</a></p><p>This weekend, I found myself helping the <a href="http://www.pdxruby.org/">Portland Ruby Brigade</a> get setup with a <a href="http://lists.pdxruby.org/mailman/listinfo/pdxruby">new mailing list</a> and while in our <span class="caps">IRC</span> channel (<strong>#pdx.rb</strong> on freenode), I was reminded that we never setup a bot in the channel. So, I went and tried to get Eggdrop running but didn’t like that the configuration file is a whopping <strong>1342 lines long</strong>. Seriously… it’s long. I am a busy person right now and this was instantly a turn-off. So, i looked around for ruby based ones… found a few python ones and found <a href="http://linuxbrit.co.uk/rbot/">rbot</a></p>
<p>yes… a ruby-based irc bot!</p>
<p><span class="caps">SVN</span> checked it out… added the few deps and the configuration file…</p>
<div class="typocode"><pre><code class="typocode_ruby ">
<span class="punct">---</span>
<span class="ident">irc</span><span class="punct">.</span><span class="ident">nick</span><span class="punct">:</span> <span class="ident">pdxrbot</span>
<span class="ident">core</span><span class="punct">.</span><span class="ident">address_prefix</span><span class="punct">:</span>
<span class="punct">-</span> <span class="punct">"</span><span class="string">?</span><span class="punct">"</span>
<span class="ident">irc</span><span class="punct">.</span><span class="ident">user</span><span class="punct">:</span> <span class="ident">pdxruby</span>
<span class="ident">server</span><span class="punct">.</span><span class="ident">name</span><span class="punct">:</span> <span class="ident">irc</span><span class="punct">.</span><span class="ident">freenode</span><span class="punct">.</span><span class="ident">net</span>
<span class="ident">auth</span><span class="punct">.</span><span class="ident">password</span><span class="punct">:</span> <span class="punct">******</span>
<span class="ident">irc</span><span class="punct">.</span><span class="ident">join_channels</span><span class="punct">:</span>
<span class="punct">-</span> <span class="punct">"</span><span class="string">#pdx.rb</span><span class="punct">"</span>
</code></pre></div>
<p>Yes! <span class="caps">YAML</span>!</p>
<p>It ran right away…and I was sold. Nice work. (and only about 1330 lines less of configuration!)</p>
<p>So, it was up and running and then I looked at the plugins api. (<strong>huge grin</strong>)</p>
<p>I’ve added two plugins to the #pdx.rb bot already. One for rubyurl (uses shorturl) and one that shows the last 5 entry titles from the planet rubyonrails site. :-)</p>
<p>We’re already scheming how we’ll make it work with meeting reminders, subversion, and other random fun. I’m quite impressed so far.</p>
<p>Check it out <a href="http://linuxbrit.co.uk/rbot/">here</a></p>