<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -55,7 +55,7 @@ threads = []
 puts &quot;irccat #{IrcCat::VERSION::STRING} (http://irccat.rubyforge.org/)&quot;
 
 Thread.new {
-  @bot = IrcCat::Bot.new(:host =&gt; @config['irc']['host'], :port =&gt; @config['irc']['port'], :nick =&gt; @config['irc']['nick'], :channel =&gt; @config['irc']['channel'])
+  @bot = IrcCat::Bot.new(:host =&gt; @config['irc']['host'], :port =&gt; @config['irc']['port'], :nick =&gt; @config['irc']['nick'], :channel =&gt; @config['irc']['channel'], :nick_pass =&gt; @config['irc']['nick_pass'], :channel_pass =&gt; @config['irc']['channel_pass'])
 }
 Thread.new {
   @tcp = IrcCat::TcpServer.new(@bot, @config, @config['tcp']['host'], @config['tcp']['port'])</diff>
      <filename>bin/irccat</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,9 @@ irc:
   host: 'irc.tty2.org'
   port: '6667'
   nick: irc_cat
+  nick_pass: foo
   channel: '#irc_cat'
+  channel_pass: bar
 
 # HTTP Server
 </diff>
      <filename>config.yml</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ module IrcCat
 # The IRC bot
 class Bot
 
-  attr_accessor :socket, :host, :port, :nick, :channel
+  attr_accessor :socket, :host, :port, :nick, :channel, :nick_pass, :channel_pass
   
   # Initialize the bot with default values
   def initialize(constructor = H.new)
@@ -106,12 +106,12 @@ class Bot
   # Automatic events
   
   def join_channels
-    sendln &quot;JOIN #{@channel}&quot;
+    sendln &quot;JOIN #{@channel} #{@channel_pass}&quot;
   end
   
   
   def auto_rejoin(channel)
-    sendln &quot;JOIN ##{channel}&quot;
+    sendln &quot;JOIN ##{channel} #{@channel_pass}&quot;
   end
   
   def login
@@ -119,6 +119,10 @@ class Bot
       #user = @mail.split(&quot;@&quot;)
       sendln &quot;NICK #{@nick}&quot;     
       sendln &quot;USER irc_cat . . :#{@realname}&quot;
+      if @nick_pass
+        puts &quot;logging in to NickServ&quot;
+        sendln &quot;PRIVMSG NICKSERV :identify #{@nick_pass}&quot;
+      end
     rescue Exception =&gt; e
       err e
     end</diff>
      <filename>lib/irc_cat/bot.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>84d4b0d3b127fb8a9bdb091256b0828e68093bb2</id>
    </parent>
  </parents>
  <author>
    <name>Michael D. Ivey</name>
    <email>ivey@gweezlebur.com</email>
  </author>
  <url>http://github.com/webs/irccat/commit/d92e4ed56832bc138d56854109947340fe90dcfc</url>
  <id>d92e4ed56832bc138d56854109947340fe90dcfc</id>
  <committed-date>2008-03-27T17:21:42-07:00</committed-date>
  <authored-date>2008-03-27T17:21:42-07:00</authored-date>
  <message>Add support for NickServ protected logins and privat channels</message>
  <tree>c0925b2e5a52a0c2084120003bf59c3599d2e6dc</tree>
  <committer>
    <name>Michael D. Ivey</name>
    <email>ivey@gweezlebur.com</email>
  </committer>
</commit>
