com.zerjio.JIRC
Interface PRIVMSGListener


public interface PRIVMSGListener

The basic interface for a PRIVMSGMessage listener.


Method Summary
 boolean listensToPRIVMSG(java.lang.String receiver, java.lang.String sender)
          Should return true if it listens to the particular receiver and false otherwise.
 void PRIVMSGReceived(PRIVMSGMessage msg)
          This method should take care about an PRIVMSGMessage that has been recieved.
 

Method Detail

PRIVMSGReceived

public void PRIVMSGReceived(PRIVMSGMessage msg)
This method should take care about an PRIVMSGMessage that has been recieved.

It should mark the message as used using IRCMessage.markAsUsed() in case that the information on the message has been used in any form. It is also responsible of using IRCMessage.mustBeDiscarded() if no other listener should get noticed about this message.

Parameters:
msg - The PRIVMSGMessage that has been received.
See Also:
markAsUsed, mustBeDiscarded

listensToPRIVMSG

public boolean listensToPRIVMSG(java.lang.String receiver,
                                java.lang.String sender)
Should return true if it listens to the particular receiver and false otherwise. If it always returns true it will listen to any PRIVMSG message. If it always returns false it will not listen to any PRIVMSG message.

Parameters:
receiver - The name of the receiver that must be tested.
sender - The name of theone who sends messages.
Returns:
true if the receiver is being listened. false if the receiver is not being listened.