com.shimari.bot
Class ConsoleMessage

java.lang.Object
  extended bycom.shimari.bot.ConsoleMessage
All Implemented Interfaces:
Message

public class ConsoleMessage
extends java.lang.Object
implements Message

Part of the implementation of ConsoleConnection.


Constructor Summary
ConsoleMessage(java.lang.String message)
           
 
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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConsoleMessage

public ConsoleMessage(java.lang.String message)
Method Detail

toString

public java.lang.String toString()

isPublic

public boolean isPublic()
Description copied from interface: Message
Was the message sent through a channel?

Specified by:
isPublic in interface Message

isAddressed

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

Specified by:
isAddressed in interface Message

getFromNick

public java.lang.String getFromNick()
Specified by:
getFromNick in interface Message

getFromUser

public java.lang.String getFromUser()
Specified by:
getFromUser in interface Message

getFromHost

public java.lang.String getFromHost()
Specified by:
getFromHost in interface Message

getMessage

public java.lang.String getMessage()
Specified by:
getMessage in interface Message

getChannel

public java.lang.String getChannel()
Specified by:
getChannel in interface Message

getToNick

public java.lang.String getToNick()
Specified by:
getToNick in interface Message

getToServer

public java.lang.String getToServer()
Specified by:
getToServer in interface Message

sendReply

public void sendReply(java.lang.String message)
Description copied from interface: 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.

Specified by:
sendReply in interface Message

sendReply

public void sendReply(java.lang.String[] message)
Description copied from interface: Message
Send a series of lines as a reply.

Specified by:
sendReply in interface Message