f00f.net.irc.martyr.commands
Class WelcomeCommand

java.lang.Object
  |
  +--f00f.net.irc.martyr.commands.GenericInCommand
        |
        +--f00f.net.irc.martyr.commands.WelcomeCommand
All Implemented Interfaces:
Command, InCommand

public class WelcomeCommand
extends GenericInCommand

Defines the commands that a server issues to welcome us. These are identified with 001, 002... etc. These commands are only received after we register, unlike the NOTICE command.


Fields inherited from class f00f.net.irc.martyr.commands.GenericInCommand
attributes
 
Constructor Summary
WelcomeCommand()
          Factory
WelcomeCommand(java.lang.String nick, java.lang.String notice)
          Used by parse to create an instance of WelcomeCommand.
 
Method Summary
 java.lang.String getIrcIdentifier()
          Returns the string IRC uses to identify this command.
 java.lang.String getNick()
           
 java.lang.String getNotice()
           
 InCommand parse(java.lang.String prefix, java.lang.String identifier, java.lang.String params)
          Parses a string and produces a formed command object, if it can.
 void selfRegister(CommandRegister commandRegister)
          Every command should know how to register itself (or not) with the command parsing engine.
 java.lang.String toString()
           
 boolean updateClientState(ClientState state)
          Sets the nick of the client state, if there is one included with this command.
 
Methods inherited from class f00f.net.irc.martyr.commands.GenericInCommand
getAttribute, getAttributeKeys, getIntParameter, getParameter, getSourceString, getState, setAttribute, setSourceString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WelcomeCommand

public WelcomeCommand()
Factory

WelcomeCommand

public WelcomeCommand(java.lang.String nick,
                      java.lang.String notice)
Used by parse to create an instance of WelcomeCommand.
Method Detail

parse

public InCommand parse(java.lang.String prefix,
                       java.lang.String identifier,
                       java.lang.String params)
Parses a string and produces a formed command object, if it can. Should return null if it cannot form the command object.
Overrides:
parse in class GenericInCommand

updateClientState

public boolean updateClientState(ClientState state)
Sets the nick of the client state, if there is one included with this command.
Overrides:
updateClientState in class GenericInCommand

getIrcIdentifier

public java.lang.String getIrcIdentifier()
Returns the string IRC uses to identify this command. Examples: NICK, PING, KILL, 332. In our case, there is no one thing.

selfRegister

public void selfRegister(CommandRegister commandRegister)
Description copied from class: GenericInCommand
Every command should know how to register itself (or not) with the command parsing engine. If a command is available under mutiple identifiers, then this method can be overridden and the addCommand method can be called multiple times.
Overrides:
selfRegister in class GenericInCommand

getNotice

public java.lang.String getNotice()

getNick

public java.lang.String getNick()
Returns:
the nick received with this command, or null if there isn't one.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2000,2001,2002,2003 f00f networks.