Author: bdonlan
Date: 2005-01-13 22:36:41 -0500 (Thu, 13 Jan 2005)
New Revision: 597

Modified:
   trunk/misc/javer/
   trunk/misc/javer/src/javer/HaverClient.java
Log:
 [EMAIL PROTECTED]:  bdonlan | 2005-01-13 22:35:43 -0500
 LIST and PART are now eligible for lagchecking



Property changes on: trunk/misc/javer
___________________________________________________________________
Name: svk:merge
   - 1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk/misc/javer:16420
   + 1f59643a-e6e5-0310-bc24-f7d4c744f460:/haver/local/trunk/misc/javer:16422

Modified: trunk/misc/javer/src/javer/HaverClient.java
===================================================================
--- trunk/misc/javer/src/javer/HaverClient.java 2005-01-14 01:26:12 UTC (rev 
596)
+++ trunk/misc/javer/src/javer/HaverClient.java 2005-01-14 03:36:41 UTC (rev 
597)
@@ -93,7 +93,7 @@
             ));
         send("HAVER\t" + versionString);
         start();
-        lagEvents = new java.util.LinkedList();
+        lagEvents = Collections.synchronizedList(new java.util.LinkedList());
     }
     
     public String getUID() {
@@ -164,6 +164,19 @@
                 popLagEvent();
             }
         });
+        fails.put("LIST", new FailHandler() {
+            public void failure(String why, String[] args) throws 
java.io.IOException {
+                /* XXX report to client */
+                popLagEvent();
+            }
+        });
+        fails.put("PART", new FailHandler() {
+            public void failure(String why, String[] args) throws 
java.io.IOException {
+                /* XXX report to client */
+                popLagEvent();
+            }
+        });
+        
     }
     
     protected void initWants() {
@@ -218,7 +231,7 @@
             public void trigger(String[] args) throws java.io.IOException {
                 if (args[2].equals(uid)) {
                     eventChannelPart(args[1]);
-                    //popLagEvent();
+                    popLagEvent();
                 } else {
                     eventChannelPart(args[1], args[2]);
                 }
@@ -240,7 +253,7 @@
                     s.add(args[i]);
                 }
                 eventChannelList(args[1], s);
-                //popLagEvent();
+                popLagEvent();
             }
         });
         serverevents.put("FAIL", new ServerHandler() {
@@ -280,6 +293,7 @@
     }
 
     public void part(String channel) throws java.io.IOException {
+        pushLagEvent();
         send("PART\t" + channel);
     }
     
@@ -386,8 +400,8 @@
     }
 
     public void sendMessage(String where, String type, String message) throws 
IOException {
+        pushLagEvent();
         send("MSG\t" + where + "\t" + type + "\t" + message);
-        pushLagEvent();
     }
     
     public void sendMessage(String where, String type, String[] message) 
throws IOException {
@@ -431,6 +445,7 @@
     }
 
     public void listChannel(String channel) throws IOException {
+        pushLagEvent();
         send("LIST\t" + channel + "\tuser");
     }
 


Reply via email to