<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>stuff/loc.rb</filename>
    </added>
    <added>
      <filename>trunk/examples/irbbot.rb</filename>
    </added>
    <added>
      <filename>trunk/examples/irccat.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,9 @@
 GUIDE
 - DONT:
-	send_command
-	subscribe_for_reply
+	------
+	| send_command
+	| subscribe_for_reply
+	-----------
 	-&gt; the reply might come before your subscription is done and you miss it
 - DO:
 	a)
@@ -14,4 +16,5 @@ GUIDE
 
 CAVEATS
 -If you use send_quit directly instead of quit, the on_disconnect will receive a :disconnect
- instead of a :quit.
\ No newline at end of file
+ instead of a :quit.
+ </diff>
      <filename>stuff/guide.txt</filename>
    </modified>
    <modified>
      <diff>@@ -42,7 +42,7 @@ client = IRC::Connection.new do
 	# and either FIXME.
 	on_disconnect { |connection, reason|
 		puts &quot;Disconnected due to #{reason}&quot;
-		IRC::Client::DefaultProc::OnDisconnect.call(client, connection, reason)
+		IRC::Connection::OnDisconnect.call(client, connection, reason)
 	}
 end
 </diff>
      <filename>trunk/examples/connection_dsl_evented.rb</filename>
    </modified>
    <modified>
      <diff>@@ -144,7 +144,13 @@ module SilverPlatter
 			end
 
 			def inspect # :nodoc:
-				&quot;#&lt;%s:0x%x %s %s (%d users)&quot; %  [self.class, object_id, @name, @connection, size]
+				sprintf &quot;#&lt;%s:0x%x %s %s (%d users)&quot;
+					self.class,
+					object_id&lt;&lt;1,
+					@name,
+					@connection,
+					size
+				# /sprintf
 			end
 
 			# Channels can't be duped</diff>
      <filename>trunk/lib/silverplatter/irc/channel.rb</filename>
    </modified>
    <modified>
      <diff>@@ -219,7 +219,12 @@ module SilverPlatter
 			end
 
 			def inspect # :nodoc:
-				&quot;#&lt;%s:0x%x connection=%08x (%d channels)&gt;&quot; %  [self.class, object_id&gt;&gt;1, @connection.object_id&gt;&gt;1, size]
+				sprintf &quot;#&lt;%s:0x%x connection=%08x (%d channels)&gt;&quot;,
+					self.class,
+					object_id&lt;&lt;1,
+					@connection.object_id&lt;&lt;1,
+					size
+				# /sprintf
 			end
 
 			private</diff>
      <filename>trunk/lib/silverplatter/irc/channellist.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,6 +31,9 @@ module SilverPlatter
 		# * SilverPlatter::IRC::Connection
 		# * SilverPlatter::IRC::Channel
 		# * http://www.faqs.org/rfcs/rfc1459.html Section 4.2.3.1
+		#
+		# == TODO
+		# Change implementation to use a String instead of a Hash.
 		class ChannelModes
 			include RFC1459_ChannelModes
 
@@ -112,6 +115,6 @@ module SilverPlatter
 			def __hash__
 				@modes
 			end
-		end
-	end
-end
+		end # ChannelModes
+	end # IRC
+end # SilverPlatter</diff>
      <filename>trunk/lib/silverplatter/irc/channelmodes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,8 @@
 
 require 'silverplatter/irc/color/sequence'
 
+
+
 module SilverPlatter
 	module IRC
 
@@ -36,170 +38,261 @@ module SilverPlatter
 		# * SilverPlatter::IRC::Color::Sequence
 		# * SilverPlatter::IRC::Color::String
 		module Color
+			# The code to reset formatting
 			Reset     = 3.chr.freeze
+			
+			# The code to switch bold on
 			Bold      = 2.chr.freeze
+			
+			# The code to switch plain on
 			Plain     = 15.chr.freeze
+			
+			# The code to switch reversing on
 			Reverse   = 18.chr.freeze
+			
+			# The code to switch underline on
 			Underline = 31.chr.freeze
+			
+			# The code to switch italic on
 			Italic    = 29.chr.freeze
+			
+			# The code to switch blinking on
 			Blink     = 9.chr.freeze # ?
 
+
+
+			# Foreground color with the given code. Code is 0-15.
+			# The codes translate to:
+			# *  0: white
+			# *  1: black
+			# *  2: blue
+			# *  3: green
+			# *  4: red
+			# *  5: brown
+			# *  6: purple
+			# *  7: orange
+			# *  8: yellow
+			# *  9: light green
+			# * 10: teal
+			# * 11: light cyan
+			# * 12: light blue
+			# * 13: pink
+			# * 14: grey
+			# * 15: light grey
+			# For every color code there's a named method too.
 			def color(code)
 				Sequence.new(code)
 			end
 
+			# Background color with the given code. Code is 0-15.
+			# The codes translate to:
+			# *  0: white
+			# *  1: black
+			# *  2: blue
+			# *  3: green
+			# *  4: red
+			# *  5: brown
+			# *  6: purple
+			# *  7: orange
+			# *  8: yellow
+			# *  9: light green
+			# * 10: teal
+			# * 11: light cyan
+			# * 12: light blue
+			# * 13: pink
+			# * 14: grey
+			# * 15: light grey
+			# For every color code there's a named method too.
 			def on_color(code)
 				Sequence.new(nil, code)
 			end
 			
+			# Set coloring back to plain
 			def plain
 				Sequence.new(nil, nil, Plain)
 			end
 			
+			# Set the font to bold
 			def bold
 				Sequence.new(nil, nil, Bold)
 			end
 			
+			# Set the text to be reversed
 			def reverse
 				Sequence.new(nil, nil, Reverse)
 			end
 			
+			# Set the font to be underlined
 			def underline
 				Sequence.new(nil, nil, Underline)
 			end
 			
+			# Set the font to italic
 			def italic
 				Sequence.new(nil, nil, Italic)
 			end
 			
+			# Set the text to blink
 			def blink
 				Sequence.new(nil, nil, Blink)
 			end
 
+			# White foreground color
 			def white
 				Sequence.new(0)
 			end
 			
+			# Black foreground color
 			def black
 				Sequence.new(1)
 			end
 			
+			# Blue foreground color
 			def blue
 				Sequence.new(2)
 			end
 			
+			# Green foreground color
 			def green
 				Sequence.new(3)
 			end
 			
+			# Red foreground color
 			def red
 				Sequence.new(4)
 			end
 			
+			# Brown foreground color
 			def brown
 				Sequence.new(5)
 			end
 			
+			# Purple foreground color
 			def purple
 				Sequence.new(6)
 			end
 			
+			# Orange foreground color
 			def orange
 				Sequence.new(7)
 			end
 			
+			# Yellow foreground color
 			def yellow
 				Sequence.new(8)
 			end
 			
+			# Light green foreground color
 			def ltgreen
 				Sequence.new(9)
 			end
 
+			# Teal foreground color
 			def teal
 				Sequence.new(10)
 			end
 			
+			# Light cyan foreground color
 			def ltcyan
 				Sequence.new(11)
 			end
 			
+			# Light blue foreground color
 			def ltblue
 				Sequence.new(12)
 			end
 			
+			# Pink foreground color
 			def pink
 				Sequence.new(13)
 			end
 			
+			# Grey foreground color
 			def grey
 				Sequence.new(14)
 			end
 			
+			# Light grey foreground color
 			def ltgrey
 				Sequence.new(15)
 			end
 
+			# White background color
 			def on_white
 				Sequence.new(nil, 0)
 			end
 			
+			# Black background color
 			def on_black
 				Sequence.new(nil, 1)
 			end
 			
+			# Blue background color
 			def on_blue
 				Sequence.new(nil, 2)
 			end
 			
+			# Green background color
 			def on_green
 				Sequence.new(nil, 3)
 			end
 			
+			# Red background color
 			def on_red
 				Sequence.new(nil, 4)
 			end
 			
+			# Brown background color
 			def on_brown
 				Sequence.new(nil, 5)
 			end
 			
+			# Purple background color
 			def on_purple
 				Sequence.new(nil, 6)
 			end
 			
+			# Orange background color
 			def on_orange
 				Sequence.new(nil, 7)
 			end
 			
+			# Yellow background color
 			def on_yellow
 				Sequence.new(nil, 8)
 			end
 			
+			# Light green background color
 			def on_ltgreen
 				Sequence.new(nil, 9)
 			end
 
+			# Teal background color
 			def on_teal
 				Sequence.new(nil, 10)
 			end
 			
+			# Light cyan background color
 			def on_ltcyan
 				Sequence.new(nil, 11)
 			end
 			
+			# Light blue background color
 			def on_ltblue
 				Sequence.new(nil, 12)
 			end
 			
+			# Pink background color
 			def on_pink
 				Sequence.new(nil, 13)
 			end
 			
+			# Grey background color
 			def on_grey
 				Sequence.new(nil, 14)
 			end
 			
+			# Light grey background color
 			def on_ltgrey
 				Sequence.new(nil, 15)
 			end</diff>
      <filename>trunk/lib/silverplatter/irc/color.rb</filename>
    </modified>
    <modified>
      <diff>@@ -206,14 +206,14 @@ module SilverPlatter
 			def inspect #:nodoc:
 				fields = @data.select { |k,v| v }.map { |k,v| &quot;#{k}=#{v}&quot; }.sort.join(&quot;, &quot;)
 				comma  = fields.empty? ? &quot;&quot; : &quot;, &quot;
-				&quot;#&lt;%s:0x%x %s %s%s%s&gt;&quot; %  [
+				sprintf &quot;#&lt;%s:0x%x %s %s%s%s&gt;&quot;,
 					self.class,
 					object_id&lt;&lt;1,
 					@raw.inspect,
 					inspect_fields,
 					comma,
 					fields
-				]
+				# /sprintf
 			end
 			
 			def method_missing(m, *args, &amp;block) # :nodoc:</diff>
      <filename>trunk/lib/silverplatter/irc/message.rb</filename>
    </modified>
    <modified>
      <diff>@@ -208,7 +208,11 @@ module SilverPlatter
 			end
 			
 			def inspect # :nodoc:
-				&quot;#&lt;%s:0x%x %s&gt;&quot; %  [self.class, object_id, @command_sets.join(', ')]
+				sprintf &quot;#&lt;%s:0x%x %s&gt;&quot;
+					self.class,
+					object_id&lt;&lt;1,
+					@command_sets.join(', ')
+				# /sprintf
 			end
 
 			# parses an incomming message and returns a Message object from which you
@@ -216,7 +220,7 @@ module SilverPlatter
 			# Expects the newlines to be already chomped off.
 			# Process a message and set the additional fields
 			# process can have side-effects on the associated Connection
-			# FIXME fix documentation of this method
+			# FIXME: documentation of this method
 			def server_message(raw)
 				prefix, command, params, symbol, from = nil
 				from, recipient, channel, text, identified = nil</diff>
      <filename>trunk/lib/silverplatter/irc/parser.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,11 +14,8 @@ module SilverPlatter
 	module IRC
 		class Parser
 
-			# == Indexing
-			# * Author:   Stefan Rusterholz
-			# * Contact:  apeiros@gmx.net&gt;
-			# * Revision: $Revision$
-			# * Date:     $Date$
+			# == Authors
+			# * Stefan Rusterholz &lt;apeiros@gmx.net&gt;
 			#
 			# == About
 			# Provides parsing information about specific commands.
@@ -32,8 +29,8 @@ module SilverPlatter
 			# * regex:     The regular expression for the parameter part of the message
 			# * mapping:   The fields associated with the regex' captures
 			# * processor: A proc to process the message further, possibly having side-effects
-			# See Butler::IRC::COMMANDS for samples on instanciation of
-			# Butler::IRC::Command objects.
+			# See SilverPlatter::IRC::COMMANDS for samples on instanciation of
+			# SilverPlatter::IRC::Command objects.
 			#
 			# == Notes
 			#</diff>
      <filename>trunk/lib/silverplatter/irc/parser/command.rb</filename>
    </modified>
    <modified>
      <diff>@@ -58,7 +58,7 @@ add(&quot;mode&quot;,    :MODE,   /^(\S*) (.*)/, [:recipient, :arguments]) { |connection,
 }
 add(&quot;nick&quot;,    :NICK,    /^:?(.*)/, [:nick]) { |connection, message, fields|
 	message[:old_nick] = message.from.nick
-	connection.update_user(from, message.nick) if message.from
+	connection.update_user(message.from, message.nick) if message.from
 }
 add(&quot;notice&quot;,  :NOTICE,  /(\S+) :(.*)/, [:recipient, :text]) { |connection, message, fields|
 	if connection.msg_identify then</diff>
      <filename>trunk/lib/silverplatter/irc/parser/rfc2812/commands.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,7 @@ require 'thread'
 
 module SilverPlatter
 	module IRC
+
 		# Used by Connection#prepare
 		class Preparation # :nodoc:
 			def initialize(connection, block)</diff>
      <filename>trunk/lib/silverplatter/irc/preparation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -130,6 +130,7 @@ module SilverPlatter
 				raise ArgumentError, &quot;Unknown arguments: #{options.keys.inspect}&quot; unless options.empty?
 			end
 			
+			# Whether this Socket is currently connected to a server or not.
 			def connected?
 				@connected
 			end
@@ -231,13 +232,13 @@ module SilverPlatter
 			end
 	
 			# identify nickname to nickserv
-			# FIXME, figure out what the server supports, possibly requires it
-			# to be moved to Butler::IRC::Client (to allow ghosting, nickchange, identify)
+			# FIXME: figure out what the server supports, possibly requires it
+			# to be moved to SilverPlatter::IRC::Connection (to allow ghosting, nickchange, identify)
 			def send_identify(password)
 				write_with_eol(&quot;NS :IDENTIFY #{password}&quot;)
 			end
 			
-			# FIXME, figure out what the server supports, possibly requires it
+			# FIXME: figure out what the server supports, possibly requires it
 			# to be moved to SilverPlatter::IRC::Connection (to allow ghosting, nickchange, identify)
 			def send_ghost(nickname, password)
 				write_with_eol(&quot;NS :GHOST #{nickname} #{password}&quot;)
@@ -353,6 +354,7 @@ module SilverPlatter
 			
 			# Give Op to user in channel
 			# User can be a nick or IRC::User, either one or an array.
+			# FIXME: check number of targets MODE can take
 			def send_multiple_mode(channel, pre, flag, targets)
 				(0...targets.length).step(10) { |i|
 					slice = targets[i,10]
@@ -423,15 +425,15 @@ module SilverPlatter
 			end
 			
 			def inspect # :nodoc:
-				&quot;#&lt;%s:0x%08x %s:%s from %s using '%s', stats: %s&gt;&quot; %  [
+				sprintf &quot;#&lt;%s:0x%08x %s:%s from %s using '%s', stats: %s&gt;&quot;,
 					self.class,
-					object_id &lt;&lt; 1,
+					object_id&lt;&lt;1,
 					@server,
 					@port,
 					@host || &quot;&lt;default&gt;&quot;,
 					@eol.inspect[1..-2],
 					@count.inspect
-				]
+				# /sprintf
 			end
 		end
 	end</diff>
      <filename>trunk/lib/silverplatter/irc/socket.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,7 @@
 
 module SilverPlatter
 	module IRC
+
 		# This module is included in the String-class and provides some methods helping with irc
 		# related issues.
 		module StringHelpers</diff>
      <filename>trunk/lib/silverplatter/irc/string.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,12 +27,12 @@ module SilverPlatter
 		# * http://www.faqs.org/rfcs/rfc1459.html Section 4.2.3.1
 		class Topic &lt; Struct.new(:text, :set_by, :set_at)
 			def inspect
-				&quot;#&lt;%s %s --%s on %s&gt;&quot; %  [
+				sprintf &quot;#&lt;%s %s --%s on %s&gt;&quot;,
 					self.class,
 					text,
 					set_by,
 					set_at.strftime(&quot;%Y-%m-%d %H:%M&quot;)
-				]
+				# /sprintf
 			end
 		end
 	end</diff>
      <filename>trunk/lib/silverplatter/irc/topic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -186,15 +186,15 @@ module SilverPlatter
 			end
 	
 			def inspect # :nodoc:
-				&quot;#&lt;%s:0x%x %s!%s@%s (%s) in %s&gt;&quot; %  [
+				sprint &quot;#&lt;%s:0x%x %s!%s@%s (%s) in %s&gt;&quot;,
 					self.class,
-					object_id,
+					object_id&lt;&lt;1,
 					@nick || &quot;?&quot;,
 					@user || &quot;?&quot;,
 					@host || &quot;?&quot;,
 					@real || &quot;?&quot;,
 					@channels.keys.map { |c| c.name }
-				]
+				# /sprintf
 			end
 			
 			# Users can't be duped
@@ -263,23 +263,23 @@ module SilverPlatter
 			# user.add_flag(@channels[&quot;#foo], &quot;@&quot;)
 			def add_flag(channel, flag) #:nodoc:
 				raise ArgumentError, &quot;User #{self} is not listed in #{channel}&quot; unless @channels.has_key?(channel)
-				raise ArgumentError, &quot;Invalid flag '#{flag}'&quot; unless Flags.include?(flag)
+				#raise ArgumentError, &quot;Invalid flag '#{flag}'&quot; unless UserModes.include?(flag)
 				current            = @channels[channel]
-				@channels[channel] = (current+flag).split.sort.join unless current.include?(flag)
+				@channels[channel] = (current+flag).unpack(&quot;C*&quot;).uniq.sort.pack(&quot;C*&quot;)
 			end
 
 			# user.add_flags(@channels[&quot;#foo], &quot;@+&quot;)
 			def add_flags(channel, flags) #:nodoc:
 				raise ArgumentError, &quot;User #{self} is not listed in #{channel}&quot; unless @channels.has_key?(channel)
-				#raise ArgumentError, &quot;Invalid flag '#{flag}'&quot; unless Flags.include?(flag)
+				#raise ArgumentError, &quot;Invalid flag '#{flag}'&quot; unless UserModes.include?(flag)
 				current            = @channels[channel]
-				@channels[channel] = (current+flags).split.uniq.sort.join
+				@channels[channel] = (current+flags).unpack(&quot;C*&quot;).uniq.sort.pack(&quot;C*&quot;)
 			end
 
 			# user.delete_flag(@channels[&quot;#foo], &quot;@&quot;)
 			def delete_flag(channel, flag) #:nodoc:
 				raise ArgumentError, &quot;User #{self} is not listed in #{channel}&quot; unless @channels.has_key?(channel)
-				raise ArgumentError, &quot;Invalid flag '#{flag}'&quot; unless Flags.include?(flag)
+				#raise ArgumentError, &quot;Invalid flag '#{flag}'&quot; unless UserModes.include?(flag)
 				@channels[channel] = @channels[channel].delete(flag)
 			end
 			</diff>
      <filename>trunk/lib/silverplatter/irc/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -34,7 +34,7 @@ module SilverPlatter
 		#   list.delete_nick(nickname) # delete a user from which you only know the nick
 		# 
 		# == Description
-		# UserList is used to keep a list of user. It can be used standalone, but it is
+		# UserList is used to keep a list of users. It can be used standalone, but it is
 		# supposed to be used in conjunction with an IRC::Connection which is used for
 		# lookups by nick and for the appropriate casemapping.
 		# UserList is Enumerable over all users, yielding user =&gt; value
@@ -265,7 +265,12 @@ module SilverPlatter
 			end
 
 			def inspect # :nodoc:
-				&quot;#&lt;%s:0x%x %s connection: %08x (%d users)&gt;&quot; %  [self.class, object_id&gt;&gt;1, @connection.object_id&gt;&gt;1, size]
+				sprintf &quot;#&lt;%s:0x%x %s connection: %08x (%d users)&gt;&quot;
+					self.class,
+					object_id&lt;&lt;1,
+					@connection.object_id&gt;&gt;1,
+					size
+				# /sprintf
 			end
 
 			private</diff>
      <filename>trunk/lib/silverplatter/irc/userlist.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@ require 'rubygems/version'
 
 module SilverPlatter
 	module IRC
+		# The version of SilverPlatter::IRC
 		VERSION = Gem::Version.new(&quot;0.1.0&quot;)
 	end
 end</diff>
      <filename>trunk/lib/silverplatter/irc/version.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>94cf175ad7ef133c689be4ab7eb60bac3ddf836b</id>
    </parent>
  </parents>
  <author>
    <name>Stefan Rusterholz</name>
    <email>apeiros@gmx.net</email>
  </author>
  <url>http://github.com/apeiros/silverplatter-irc/commit/44988c9fd20a16e740884197883e251d40713820</url>
  <id>44988c9fd20a16e740884197883e251d40713820</id>
  <committed-date>2008-06-19T03:37:09-07:00</committed-date>
  <authored-date>2008-06-19T03:37:09-07:00</authored-date>
  <message>minor changes, added loc.rb and irccat.rb</message>
  <tree>ada182d9385b3a106f6d7be6cc185e3f233662b3</tree>
  <committer>
    <name>Stefan Rusterholz</name>
    <email>apeiros@gmx.net</email>
  </committer>
</commit>
