diff -urN tiarra-20060526/.svnversion tiarra-20060628/.svnversion
--- tiarra-20060526/.svnversion	2006-05-26 00:41:00.000000000 +0900
+++ tiarra-20060628/.svnversion	2006-06-28 23:55:53.000000000 +0900
@@ -1 +1 @@
-912
+913
diff -urN tiarra-20060526/ChangeLog.svn tiarra-20060628/ChangeLog.svn
--- tiarra-20060526/ChangeLog.svn	2006-05-26 00:41:09.000000000 +0900
+++ tiarra-20060628/ChangeLog.svn	2006-06-28 23:56:03.000000000 +0900
@@ -1,4 +1,11 @@
 ------------------------------------------------------------------------
+r913 | topia | 2006-06-28 23:51:54 +0900 (Wed, 28 Jun 2006) | 2 lines
+Changed paths:
+   M /trunk/main/RunLoop.pm
+
+ * send ping to client frequently.
+
+------------------------------------------------------------------------
 r912 | topia | 2006-05-26 00:34:04 +0900 (Fri, 26 May 2006) | 1 line
 Changed paths:
    M /trunk/all.conf
diff -urN tiarra-20060526/main/RunLoop.pm tiarra-20060628/main/RunLoop.pm
--- tiarra-20060526/main/RunLoop.pm	2006-05-26 00:41:01.000000000 +0900
+++ tiarra-20060628/main/RunLoop.pm	2006-06-28 23:55:54.000000000 +0900
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: RunLoop.pm 893 2005-04-20 12:33:59Z topia $
+# $Id: RunLoop.pm 913 2006-06-28 14:51:54Z topia $
 # -----------------------------------------------------------------------------
 # このクラスはTiarraのメインループを実装します。
 # select()を実行し、サーバーやクライアントとのI/Oを行うのはこのクラスです。
@@ -803,7 +803,7 @@
     # 鯖に接続
     $this->update_networks;
 
-    # 3分毎に全ての鯖にPINGを送るタイマーをインストール。
+    # 3分毎に全ての鯖とクライアントにPINGを送るタイマーをインストール。
     # これはtcp接続の切断に気付かない事があるため。
     # 応答のPONGは捨てる。このためにPONG破棄カウンタをインクリメントする。
     # PONG破棄カウンタはIrcIO::Serverのremarkで、キーは'pong-drop-counter'
@@ -820,6 +820,18 @@
 		$network->remark('pong-drop-counter',
 				 utils->get_first_defined($cntr,0) + 1);
 	    }
+
+	    my $prefix = $this->_runloop->sysmsg_prefix('system');
+	    foreach my $client ($this->clients_list) {
+		$client->send_message(
+		    $this->construct_irc_message(
+			Command => 'PING',
+			Param => $prefix));
+
+		my $cntr = $client->remark('pong-drop-counter');
+		$client->remark('pong-drop-counter',
+				utils->get_first_defined($cntr,0) + 1);
+	    }
 	},
 	Repeat => 1,
 	Name => __PACKAGE__ . '/send ping',
@@ -947,18 +959,18 @@
 				next;
 			    }
 
-			    if ($socket->isa("IrcIO::Server")) {
-				# このメッセージがPONGであればpong-drop-counterを見る。
-				if ($msg->command eq 'PONG') {
-				    my $cntr = $socket->remark('pong-drop-counter');
-				    if (defined $cntr && $cntr > 0) {
-					# このPONGは捨てる。
-					$cntr--;
-					$socket->remark('pong-drop-counter',$cntr);
-					next;
-				    }
+			    # このメッセージがPONGであればpong-drop-counterを見る。
+			    if ($msg->command eq 'PONG') {
+				my $cntr = $socket->remark('pong-drop-counter');
+				if (defined $cntr && $cntr > 0) {
+				    # このPONGは捨てる。
+				    $cntr--;
+				    $socket->remark('pong-drop-counter',$cntr);
+				    next;
 				}
+			    }
 
+			    if ($socket->isa("IrcIO::Server")) {
 				# メッセージをMulticastのフィルタに通す。
 				my @received_messages =
 				    Multicast::from_server_to_client($msg,$socket);
