irssibot.protocol
Class ModeMessage

java.lang.Object
  |
  +--irssibot.protocol.IrcMessage
        |
        +--irssibot.protocol.ModeMessage

public class ModeMessage
extends IrcMessage

Represents an IRC protocol MODE message.

The JOIN message format is:

 :nick!ident@host MODE #channel [+modes][-modes] [target1] [target2] ..
 

Version:
$Name: $ $Revision: 1.1 $
Author:
Matti Dahlbom
See Also:

Field Summary
private  boolean channelMode
          Whether this MODE describes a channel's mode change or a user's mode change on a channel.
private  java.lang.String channelName
          Channel name
private  java.lang.String modeString
          Mode string
private  Host sourceHost
          Sources host
private  java.lang.String[] targetList
          Target list
 
Fields inherited from class irssibot.protocol.IrcMessage
arguments, command, prefix, raw, trailing
 
Constructor Summary
protected ModeMessage(java.lang.String prefix, java.lang.String command, java.lang.String[] arguments, java.lang.String trailing, java.lang.String raw)
          Constructs with all the parts already parsed.
 
Method Summary
 java.lang.String getChannelName()
          Returns the channel name.
 java.lang.String getModeString()
          Returns the modestring.
 Host getSourceHost()
          Returns the source host.
 java.lang.String[] getTargetList()
          Returns the target list.
 boolean isChannelMode()
          Returns true if this MODE message describes a channel mode change, and false if it describes a user's mode change on a channel.
 
Methods inherited from class irssibot.protocol.IrcMessage
getArguments, getCommand, getPrefix, getTrailing, parse, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sourceHost

private Host sourceHost
Sources host


channelName

private java.lang.String channelName
Channel name


modeString

private java.lang.String modeString
Mode string


targetList

private java.lang.String[] targetList
Target list


channelMode

private boolean channelMode
Whether this MODE describes a channel's mode change or a user's mode change on a channel.

Constructor Detail

ModeMessage

protected ModeMessage(java.lang.String prefix,
                      java.lang.String command,
                      java.lang.String[] arguments,
                      java.lang.String trailing,
                      java.lang.String raw)
Constructs with all the parts already parsed. Sets JoinMessage specific data.

Parameters:
prefix - prefix part
command - command part
arguments - arguments
trailing - trailing part
raw - the raw message
Throws:
java.lang.IllegalArgumentException - if message format is invalid
Method Detail

getSourceHost

public Host getSourceHost()
Returns the source host.


getChannelName

public java.lang.String getChannelName()
Returns the channel name.


getModeString

public java.lang.String getModeString()
Returns the modestring.


getTargetList

public java.lang.String[] getTargetList()
Returns the target list.


isChannelMode

public boolean isChannelMode()
Returns true if this MODE message describes a channel mode change, and false if it describes a user's mode change on a channel.



IrssiBot (c) 2000-2002 Matti Dahlbom