Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.objexcel.irc
Interface IRCMessageListener

All Known Implementing Classes:
  IRCMessageAdapter

public abstract interface IRCMessageListener
extends java.util.EventListener

IRCMessageListener allows listener to intercept irc events For more information hunt down RFC1459 (the spec on IRC).

Method Summary
`java.lang.String` | `getActorInterest()` override this method so your listener only gets messages sent from this user.
`java.lang.String` | `getChannelInterest()` override this method so your listener only gets messages sent from this channel.
`void` | `onChannelMode(IRCMessage message, java.lang.String channel, char change, java.lang.String modeString, int modeMask, int limit, java.lang.String[] operators, java.lang.String[] banned, java.lang.String[] voiced)` sent when user changes mode.
`void` | `onCTCPAction(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String sData)` a parsed CTCP message
`void` | `onCTCPClientInfo(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String sData)`
`void` | `onCTCPDCCChat(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, long address, int port)`
`void` | `onCTCPDCCSend(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String file, long address, int port, int fileSize)`
`void` | `onCTCPErrMsg(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String sData)`
`void` | `onCTCPFinger(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String sData)`
`void` | `onCTCPMessage(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String sTag, java.lang.String sData)`
`void` | `onCTCPPing(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String sData)`
`void` | `onCTCPSource(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String sData)`
`void` | `onCTCPTime(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String sData)`
`void` | `onCTCPUnrecognisedTag(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String sTag, java.lang.String sData)`
`void` | `onCTCPUserInfo(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String sData)`
`void` | `onCTCPVersion(IRCMessage m, boolean bNotice, java.lang.String actor, java.util.Hashtable recipients, java.lang.String sData)`
`void` | `onEndOfNames(IRCMessage m, java.lang.String channel)`
`void` | `onIsOn(IRCMessage message, java.lang.String[] nicks)`
`void` | `onJoin(IRCMessage m, java.lang.String nickname, java.util.Hashtable channels, java.lang.String[] keys)`
`void` | `onKick(IRCMessage m, java.lang.String channel, java.lang.String nick, java.lang.String msg)`
`void` | `onList(IRCMessage m, java.lang.String channel, int visible, java.lang.String topic)`
`void` | `onListenerRemoved()` sent when the the listener is being removed.
`void` | `onMessage(IRCMessage m)` one of these will be sent for every message sent for every message (as well as a parse event, if applicable
`void` | `onNames(IRCMessage m, java.lang.String channel, java.lang.String[] nicks)` parsed numeric messages
`void` | `onNick(IRCMessage m, java.lang.String oldnick, java.lang.String newnick, int hopcount)`
`void` | `onNotice(IRCMessage m, java.lang.String actor, java.lang.String recipient, java.lang.String msg)`
`void` | `onObjircInfo(IRCMessage m, int level, java.lang.String errMsg)` A message generated by Objirc chat (information about an error).
`void` | `onPart(IRCMessage m, java.lang.String nick, java.util.Hashtable channels)`
`void` | `onPing(IRCMessage m, java.lang.String pingServer1, java.lang.String pingServer2)`
`void` | `onPrivMsg(IRCMessage m, java.lang.String actor, java.util.Hashtable recipients, java.lang.String msg)` A standard IRC message
`void` | `onQuit(IRCMessage m, java.lang.String nick, java.lang.String quitmsg)`
`void` | `onSessionConnecting(java.lang.String server)` sent when Objirc Chat begins connecting with a server
`void` | `onSessionStarted(java.lang.String server)` sent when Objirc Chat opens a connection to the server
`void` | `onSessionTerminated(java.lang.String server)` sent when the connection is closed (either by the user or by the server)
`void` | `onSyntaxError(IRCMessage m, java.lang.String errMsg)` Sent when Objirc Chat cannot parse a message.
`void` | `onTopic(IRCMessage m, java.lang.String channel, java.lang.String topic)`
`void` | `onUnrecognisedMessage(IRCMessage m)` sent if Objirc Chat does not parse the message specially specific event found.
`void` | `onUserMode(IRCMessage message, java.lang.String user, char change, java.lang.String modeString, int modeMask)` sent when user changes mode.
`void` | `onWho(IRCMessage message, java.lang.String channel, java.lang.String user, java.lang.String host, java.lang.String server, java.lang.String nick, char hereOrGone, boolean bIRCOp, char opPrefix, int hopCount, java.lang.String realName)`
`void` | `onWhoIsChannels(IRCMessage message, java.lang.String nick, java.lang.String[] prefixedChannels)`
`void` | `onWhoIsIdle(IRCMessage message, java.lang.String nick, int secondsIdle, java.util.Date joined)`
`void` | `onWhoIsOperator(IRCMessage message, java.lang.String nick)`
`void` | `onWhoIsServer(IRCMessage message, java.lang.String nick, java.lang.String server, java.lang.String serverInfo)`
`void` | `onWhoIsUser(IRCMessage message, java.lang.String nick, java.lang.String user, java.lang.String host, java.lang.String realName)`
`void` | `onWhoWasUser(IRCMessage message, java.lang.String nick, java.lang.String user, java.lang.String host, java.lang.String realName)`

Method Detail

### onMessage

    public void onMessage(IRCMessage m)
                   throws java.lang.Exception

  one of these will be sent for every message sent for every message (as well as a parse event, if applicable

### onUnrecognisedMessage

    public void onUnrecognisedMessage(IRCMessage m)
                               throws java.lang.Exception

  sent if Objirc Chat does not parse the message specially specific event found. Not too wise to rely on this event since future versions of Objirc Chat may decide to recognise (ie. parse) the message. Safer to use onMessage which is sent for every message.

### onPrivMsg

    public void onPrivMsg(IRCMessage m,
                          java.lang.String actor,
                          java.util.Hashtable recipients,
                          java.lang.String msg)
                   throws java.lang.Exception

  A standard IRC message

### onPing

    public void onPing(IRCMessage m,
                       java.lang.String pingServer1,
                       java.lang.String pingServer2)
                throws java.lang.Exception

### onJoin

    public void onJoin(IRCMessage m,
                       java.lang.String nickname,
                       java.util.Hashtable channels,
                       java.lang.String[] keys)
                throws java.lang.Exception

### onPart

    public void onPart(IRCMessage m,
                       java.lang.String nick,
                       java.util.Hashtable channels)
                throws java.lang.Exception

### onNick

    public void onNick(IRCMessage m,
                       java.lang.String oldnick,
                       java.lang.String newnick,
                       int hopcount)
                throws java.lang.Exception

### onKick

    public void onKick(IRCMessage m,
                       java.lang.String channel,
                       java.lang.String nick,
                       java.lang.String msg)
                throws java.lang.Exception

### onQuit

    public void onQuit(IRCMessage m,
                       java.lang.String nick,
                       java.lang.String quitmsg)
                throws java.lang.Exception

### onNotice

    public void onNotice(IRCMessage m,
                         java.lang.String actor,
                         java.lang.String recipient,
                         java.lang.String msg)
                  throws java.lang.Exception

### onUserMode

    public void onUserMode(IRCMessage message,
                           java.lang.String user,
                           char change,
                           java.lang.String modeString,
                           int modeMask)
                    throws java.lang.Exception

  sent when user changes mode. change should be one of '+' or '-'. modeMask is per IRCMessage.UserModeConstants

### onChannelMode

    public void onChannelMode(IRCMessage message,
                              java.lang.String channel,
                              char change,
                              java.lang.String modeString,
                              int modeMask,
                              int limit,
                              java.lang.String[] operators,
                              java.lang.String[] banned,
                              java.lang.String[] voiced)
                       throws java.lang.Exception

  sent when user changes mode. change should be one of '+' or '-'. modeMask is per IRCMessage.ChannelModeConstants

### onNames

    public void onNames(IRCMessage m,
                        java.lang.String channel,
                        java.lang.String[] nicks)
                 throws java.lang.Exception

  parsed numeric messages

### onEndOfNames

    public void onEndOfNames(IRCMessage m,
                             java.lang.String channel)
                      throws java.lang.Exception

### onTopic

    public void onTopic(IRCMessage m,
                        java.lang.String channel,
                        java.lang.String topic)
                 throws java.lang.Exception

### onList

    public void onList(IRCMessage m,
                       java.lang.String channel,
                       int visible,
                       java.lang.String topic)
                throws java.lang.Exception

### onWhoIsUser

    public void onWhoIsUser(IRCMessage message,
                            java.lang.String nick,
                            java.lang.String user,
                            java.lang.String host,
                            java.lang.String realName)
                     throws java.lang.Exception

### onWhoWasUser

    public void onWhoWasUser(IRCMessage message,
                             java.lang.String nick,
                             java.lang.String user,
                             java.lang.String host,
                             java.lang.String realName)
                      throws java.lang.Exception

### onWhoIsServer

    public void onWhoIsServer(IRCMessage message,
                              java.lang.String nick,
                              java.lang.String server,
                              java.lang.String serverInfo)
                       throws java.lang.Exception

### onWhoIsIdle

    public void onWhoIsIdle(IRCMessage message,
                            java.lang.String nick,
                            int secondsIdle,
                            java.util.Date joined)
                     throws java.lang.Exception

### onWhoIsOperator

    public void onWhoIsOperator(IRCMessage message,
                                java.lang.String nick)
                         throws java.lang.Exception

### onWhoIsChannels

    public void onWhoIsChannels(IRCMessage message,
                                java.lang.String nick,
                                java.lang.String[] prefixedChannels)
                         throws java.lang.Exception

### onWho

    public void onWho(IRCMessage message,
                      java.lang.String channel,
                      java.lang.String user,
                      java.lang.String host,
                      java.lang.String server,
                      java.lang.String nick,
                      char hereOrGone,
                      boolean bIRCOp,
                      char opPrefix,
                      int hopCount,
                      java.lang.String realName)
               throws java.lang.Exception

### onIsOn

    public void onIsOn(IRCMessage message,
                       java.lang.String[] nicks)
                throws java.lang.Exception

### onCTCPAction

    public void onCTCPAction(IRCMessage m,
                             boolean bNotice,
                             java.lang.String actor,
                             java.util.Hashtable recipients,
                             java.lang.String sData)
                      throws java.lang.Exception

  a parsed CTCP message

### onCTCPClientInfo

    public void onCTCPClientInfo(IRCMessage m,
                                 boolean bNotice,
                                 java.lang.String actor,
                                 java.util.Hashtable recipients,
                                 java.lang.String sData)
                          throws java.lang.Exception

### onCTCPErrMsg

    public void onCTCPErrMsg(IRCMessage m,
                             boolean bNotice,
                             java.lang.String actor,
                             java.util.Hashtable recipients,
                             java.lang.String sData)
                      throws java.lang.Exception

### onCTCPFinger

    public void onCTCPFinger(IRCMessage m,
                             boolean bNotice,
                             java.lang.String actor,
                             java.util.Hashtable recipients,
                             java.lang.String sData)
                      throws java.lang.Exception

### onCTCPUserInfo

    public void onCTCPUserInfo(IRCMessage m,
                               boolean bNotice,
                               java.lang.String actor,
                               java.util.Hashtable recipients,
                               java.lang.String sData)
                        throws java.lang.Exception

### onCTCPVersion

    public void onCTCPVersion(IRCMessage m,
                              boolean bNotice,
                              java.lang.String actor,
                              java.util.Hashtable recipients,
                              java.lang.String sData)
                       throws java.lang.Exception

### onCTCPSource

    public void onCTCPSource(IRCMessage m,
                             boolean bNotice,
                             java.lang.String actor,
                             java.util.Hashtable recipients,
                             java.lang.String sData)
                      throws java.lang.Exception

### onCTCPTime

    public void onCTCPTime(IRCMessage m,
                           boolean bNotice,
                           java.lang.String actor,
                           java.util.Hashtable recipients,
                           java.lang.String sData)
                    throws java.lang.Exception

### onCTCPPing

    public void onCTCPPing(IRCMessage m,
                           boolean bNotice,
                           java.lang.String actor,
                           java.util.Hashtable recipients,
                           java.lang.String sData)
                    throws java.lang.Exception

### onCTCPUnrecognisedTag

    public void onCTCPUnrecognisedTag(IRCMessage m,
                                      boolean bNotice,
                                      java.lang.String actor,
                                      java.util.Hashtable recipients,
                                      java.lang.String sTag,
                                      java.lang.String sData)
                               throws java.lang.Exception

### onCTCPMessage

    public void onCTCPMessage(IRCMessage m,
                              boolean bNotice,
                              java.lang.String actor,
                              java.util.Hashtable recipients,
                              java.lang.String sTag,
                              java.lang.String sData)
                       throws java.lang.Exception

### onCTCPDCCSend

    public void onCTCPDCCSend(IRCMessage m,
                              boolean bNotice,
                              java.lang.String actor,
                              java.util.Hashtable recipients,
                              java.lang.String file,
                              long address,
                              int port,
                              int fileSize)
                       throws java.lang.Exception

### onCTCPDCCChat

    public void onCTCPDCCChat(IRCMessage m,
                              boolean bNotice,
                              java.lang.String actor,
                              java.util.Hashtable recipients,
                              long address,
                              int port)
                       throws java.lang.Exception

### onObjircInfo

    public void onObjircInfo(IRCMessage m,
                             int level,
                             java.lang.String errMsg)
                      throws java.lang.Exception

  A message generated by Objirc chat (information about an error).
  Parameters:
    `level` - (1 to 10) ranges from information to fatal error

### onSyntaxError

    public void onSyntaxError(IRCMessage m,
                              java.lang.String errMsg)
                       throws java.lang.Exception

  Sent when Objirc Chat cannot parse a message. The message is either poorly formed, or our code it.

### onSessionConnecting

    public void onSessionConnecting(java.lang.String server)
                             throws java.lang.Exception

  sent when Objirc Chat begins connecting with a server

### onSessionStarted

    public void onSessionStarted(java.lang.String server)
                          throws java.lang.Exception

  sent when Objirc Chat opens a connection to the server

### onSessionTerminated

    public void onSessionTerminated(java.lang.String server)
                             throws java.lang.Exception

  sent when the connection is closed (either by the user or by the server)

### onListenerRemoved

    public void onListenerRemoved()
                           throws java.lang.Exception

  sent when the the listener is being removed. e.g. when a addin is unloaded.

### getChannelInterest

    public java.lang.String getChannelInterest()

  override this method so your listener only gets messages sent from this channel. Listeners returning null will receive all messages

### getActorInterest

    public java.lang.String getActorInterest()

  override this method so your listener only gets messages sent from this user. Listeners returning null will receive all messages

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD