Index: /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCConsole.java
===================================================================
--- /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCConsole.java (revision 25815)
+++ /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCConsole.java (revision 25884)
@@ -16,4 +16,5 @@
 import java.io.IOException;
 import java.net.MalformedURLException;
+import java.util.Date;
 import java.util.Formatter;
 import java.util.Properties;
@@ -144,4 +145,42 @@
 
 	/**
+	 * CommandPublisher
+	 */
+	class CommandPublisher implements Runnable
+	{
+		/** コマンド */
+		protected String str;
+
+		/**
+		 * @param command コマンド
+		 */
+		public CommandPublisher(String command)
+		{
+			this.str = command;
+		}
+
+		/**
+		 * 
+		 */
+		public void run()
+		{
+			// IRC ネットワークに送信
+			if (str.startsWith("/"))
+			{
+				// コマンド
+				irc.put("tokyo", str.substring(1));
+			}
+			else
+			{
+				// メッセージ送信
+				String groupName = "tokyo";
+				String channelName = "#javabreak";
+				String message = str;
+				irc.privmsg(groupName, channelName, message);
+			}
+		}
+	}
+
+	/**
 	 * コマンドを送信します。
 	 * 
@@ -153,14 +192,4 @@
 		appendLine(command);
 
-		// IRC ネットワークに送信
-		if (command.startsWith("/"))
-		{
-			// コマンド
-			irc.put("tokyo", command.substring(1));
-		}
-		else
-		{
-			// メッセージ送信
-		}
 	}
 
@@ -179,20 +208,46 @@
 			irc = new IRCClient();
 			irc.setUseSystemProxies(true);
-			irc.registerHandler(new IRCMessageHandler()
+			irc.registerHandler(new IRCMessageAdapter()
 			{
-				public void reply(IRCMessage msg)
+				/** エンコーディング */
+				String encoding = "ISO-2022-JP";
+
+//				@Override
+//				public void reply(IRCMessage reply)
+//				{
+//					super.reply(reply);
+//					appendLine(reply.getMessage(encoding));
+//				}
+
+				/**
+				 * @see com.mac.tarchan.irc.client.IRCMessageAdapter#welcome(com.mac.tarchan.irc.client.IRCMessage)
+				 */
+				@Override
+				public void welcome(IRCMessage reply)
 				{
-					// TODO メッセージを表示
-					String encoding = "ISO-2022-JP";
-					String nick = msg.getNick();
-					String text = msg.getTrailing(encoding);
-					formatter.format("(%s) %s" + NL, nick, text);
-					flush();
+					appendLine(reply.getTrailing(encoding));
 				}
 
-				public void error(Exception e)
+				/**
+				 * @see com.mac.tarchan.irc.client.IRCMessageAdapter#ping(com.mac.tarchan.irc.client.IRCMessage)
+				 */
+				@Override
+				public void ping(IRCMessage reply)
 				{
-					// エラーを表示
-					e.printStackTrace();
+					appendLine("PONG " + reply.getTrailing(encoding));
+				}
+
+				/**
+				 * @see com.mac.tarchan.irc.client.IRCMessageAdapter#privmsg(com.mac.tarchan.irc.client.IRCMessage)
+				 */
+				@Override
+				public void privmsg(IRCMessage reply)
+				{
+					// メッセージを表示
+					Date date = new Date(reply.getWhen());
+					String nick = reply.getNick();
+					String text = reply.getTrailing(encoding);
+					String str = String.format("%tR (%s) %s", date, nick, text);
+					appendLine(str);
 				}
 			});
Index: /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCMessageAdapter.java
===================================================================
--- /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCMessageAdapter.java (revision 25884)
+++ /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCMessageAdapter.java (revision 25884)
@@ -0,0 +1,109 @@
+/*
+ * IRCMessageAdapter.java
+ * IRCKit
+ *
+ * Created by tarchan on 2008/12/04.
+ * Copyright (c) 2008 tarchan. All rights reserved.
+ */
+package com.mac.tarchan.irc.client;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+
+/**
+ * IRCMessageAdapter
+ * 
+ * @author tarchan
+ */
+public class IRCMessageAdapter implements IRCMessageListener
+{
+	/** IRCコマンドに対応するアクション */
+	protected HashMap<String, Method> actions = new HashMap<String, Method>();
+
+	/**
+	 * IRCメッセージアダプタを構築します。
+	 */
+	public IRCMessageAdapter()
+	{
+		registerAction("001", "welcome");
+		registerAction("PING", "ping");
+		registerAction("PRIVMSG", "privmsg");
+	}
+
+	/**
+	 * 指定されたアクションをを登録します。
+	 * 
+	 * @param key IRCコマンド
+	 * @param action アクション
+	 */
+	protected void registerAction(String key, String action)
+	{
+		try
+		{
+			Class<? extends IRCMessageListener> c = getClass();
+			Method m = c.getMethod(action, IRCMessage.class);
+			actions.put(key, m);
+		}
+		catch (SecurityException e)
+		{
+			e.printStackTrace();
+		}
+		catch (NoSuchMethodException e)
+		{
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * @see com.mac.tarchan.irc.client.IRCMessageListener#reply(com.mac.tarchan.irc.client.IRCMessage)
+	 */
+	public void reply(IRCMessage reply)
+	{
+		try
+		{
+			String cmd = reply.getCommand();
+			Method m = actions.get(cmd);
+			if (m != null) m.invoke(this, reply);
+		}
+		catch (IllegalArgumentException e)
+		{
+			e.printStackTrace();
+		}
+		catch (IllegalAccessException e)
+		{
+			e.printStackTrace();
+		}
+		catch (InvocationTargetException e)
+		{
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * IRCネットワークに接続した場合に受け取ります。
+	 * 
+	 * @param reply リプライメッセージ
+	 */
+	public void welcome(IRCMessage reply)
+	{
+	}
+
+	/**
+	 * PINGメッセージを受け取ります。
+	 * 
+	 * @param reply リプライメッセージ
+	 */
+	public void ping(IRCMessage reply)
+	{
+	}
+
+	/**
+	 * チャットメッセージを受け取ります。
+	 * 
+	 * @param reply リプライメッセージ
+	 */
+	public void privmsg(IRCMessage reply)
+	{
+	}
+}
Index: /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCMessageListener.java
===================================================================
--- /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCMessageListener.java (revision 25144)
+++ /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCMessageListener.java (revision 25884)
@@ -3,5 +3,5 @@
  * IRCKit
  *
- * Created by tarchan on 2008/04/04.
+ * Created by tarchan on 2008/11/27.
  * Copyright (c) 2008 tarchan. All rights reserved.
  */
@@ -9,5 +9,6 @@
 
 /**
- * @since 1.0
+ * IRCMessageListener
+ * 
  * @author tarchan
  */
@@ -15,15 +16,8 @@
 {
 	/**
-	 * メッセージを受け取ります。
+	 * リプライメッセージを受け取ります。
 	 * 
-	 * @param message IRC メッセージ
+	 * @param reply リプライメッセージ
 	 */
-	public void onMessage(IRCMessage message);
-
-	/**
-	 * エラーを受け取ります。
-	 * 
-	 * @param e 発生した例外
-	 */
-	public void onError(Exception e);
+	public void reply(IRCMessage reply);
 }
Index: /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCClient.java
===================================================================
--- /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCClient.java (revision 25815)
+++ /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCClient.java (revision 25884)
@@ -19,5 +19,5 @@
 {
 	/** メッセージハンドラ */
-	protected ArrayList<IRCMessageHandler> handlers = new ArrayList<IRCMessageHandler>();
+	protected ArrayList<IRCMessageListener> handlers = new ArrayList<IRCMessageListener>();
 
 	/**
@@ -48,5 +48,5 @@
 	 * @param handler メッセージハンドラ
 	 */
-	public void registerHandler(IRCMessageHandler handler)
+	public void registerHandler(IRCMessageListener handler)
 	{
 		handlers.add(handler);
@@ -129,5 +129,5 @@
 	public void reply(IRCMessage msg)
 	{
-		for (IRCMessageHandler handle : handlers)
+		for (IRCMessageListener handle : handlers)
 		{
 			handle.reply(msg);
Index: /ng/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCMessageHandler.java
===================================================================
--- /lang/java/IRCKit/trunk/src/com/mac/tarchan/irc/client/IRCMessageHandler.java (revision 25795)
+++  (revision )
@@ -1,30 +1,0 @@
-/*
- * IRCMessageHandler.java
- * IRCKit
- *
- * Created by tarchan on 2008/11/27.
- * Copyright (c) 2008 tarchan. All rights reserved.
- */
-package com.mac.tarchan.irc.client;
-
-/**
- * IRCMessageHandler
- * 
- * @author tarchan
- */
-public interface IRCMessageHandler
-{
-	/**
-	 * メッセージを処理します。
-	 * 
-	 * @param msg メッセージ
-	 */
-	public void reply(IRCMessage msg);
-
-	/**
-	 * 例外を処理します。
-	 * 
-	 * @param e 例外
-	 */
-	public void error(Exception e);
-}
