KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > rero > client > server > UpdateIAL


1 package rero.client.server;
2
3 import rero.ircfw.interfaces.*;
4 import java.util.*;
5
6 public class UpdateIAL implements ChatListener
7 {
8    public int fireChatEvent(HashMap eventDescription)
9    {
10        String JavaDoc event = (String JavaDoc)eventDescription.get("$event");
11
12        if (event.equals("315"))
13        {
14           return REMOVE_LISTENER | EVENT_HALT; // end of a /who reply we got what we wanted
15
}
16        else if (event.equals("352"))
17        {
18           return EVENT_HALT; // we're still getting the reply, so ignore it for now.
19
}
20
21        return EVENT_DONE;
22    }
23
24    public boolean isChatEvent(String JavaDoc event, HashMap eventDescription)
25    {
26        if (event.equals("315")) { return true; } /* End of /WHO reply */
27        if (event.equals("352")) { return true; } /* /WHO reply */
28
29        return false;
30    }
31 }
32
Popular Tags