de.berlios.suzy.irc
Class IrcCommandEvent

java.lang.Object
  extended by de.berlios.suzy.irc.IrcCommandEvent

public class IrcCommandEvent
extends java.lang.Object

This is the Event that a command from irc will be passed to the appropriate plugin with. It contains a reference to the IrcSender which is responsible for answering, the target the message came from, the command itself and the message after the command if any.

Author:
honk

Constructor Summary
IrcCommandEvent(IrcSender source, IrcTarget target, java.lang.String prefix, java.lang.String command, java.lang.String message)
          Constructs a new IrcCommandEvent with the given data.
 
Method Summary
 java.lang.String getCommand()
          returns the command that was issued
 java.lang.String getMessageContent()
          returns the message following the command, stripped of leading and trailing spaces
 java.lang.String getPrefix()
           
 IrcSender getSource()
          returns the source for this event
 IrcTarget getTarget()
          returns the target that caused this event and probably expects an answer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IrcCommandEvent

public IrcCommandEvent(IrcSender source,
                       IrcTarget target,
                       java.lang.String prefix,
                       java.lang.String command,
                       java.lang.String message)
Constructs a new IrcCommandEvent with the given data.

Parameters:
source - the source where the event occured (typically an IrcClient)
target - contains information about who caused the event
command - the command that was issued
message - the message following the command, stripped of leading and trailing spaces
Method Detail

getSource

public IrcSender getSource()
returns the source for this event

Returns:
the source where the event occured (typically an IrcClient)

getTarget

public IrcTarget getTarget()
returns the target that caused this event and probably expects an answer

Returns:
contains information about who caused the event

getCommand

public java.lang.String getCommand()
returns the command that was issued

Returns:
the command that was issued

getMessageContent

public java.lang.String getMessageContent()
returns the message following the command, stripped of leading and trailing spaces

Returns:
the message following the command, stripped of leading and trailing spaces

getPrefix

public java.lang.String getPrefix()