com.shimari.bot
Interface Message

All Known Implementing Classes:
ConsoleMessage, IRC_Message

public interface Message

A Message comes from a Connection and represents something sent to the connector by a client. The message may be public or private, and it may have been sent to us directly or via a channel on the connector. To reply to the message it is not necessary to inspect who sent it--calling sendReply() will send a response back to wherever the message originated.


Method Summary
 java.lang.String getChannel()
           
 java.lang.String getFromHost()
           
 java.lang.String getFromNick()
           
 java.lang.String getFromUser()
           
 java.lang.String getMessage()
           
 java.lang.String getToNick()
           
 java.lang.String getToServer()
           
 boolean isAddressed()
          Was the message directly addressed to us?
 boolean isPublic()
          Was the message sent through a channel?
 void sendReply(java.lang.String message)
          Send a reply to the originator.
 void sendReply(java.lang.String[] message)
          Send a series of lines as a reply.
 

Method Detail

isPublic

public boolean isPublic()
Was the message sent through a channel?


isAddressed

public boolean isAddressed()
Was the message directly addressed to us? (True if it was a private message, or a public channel that referred to us by name


getFromNick

public java.lang.String getFromNick()

getFromUser

public java.lang.String getFromUser()

getFromHost

public java.lang.String getFromHost()

getMessage

public java.lang.String getMessage()

getChannel

public java.lang.String getChannel()

getToNick

public java.lang.String getToNick()

getToServer

public java.lang.String getToServer()

sendReply

public void sendReply(java.lang.String message)
Send a reply to the originator. If it was a public message on a channel the reply will go to the channel; if it was a private message the reply will go to the nick as a private message.


sendReply

public void sendReply(java.lang.String[] message)
Send a series of lines as a reply.