com.leafdigital.irc.api
Class UserCommandMsg

java.lang.Object
  extended by leafchat.core.api.Msg
      extended by com.leafdigital.irc.api.UserCommandMsg

public class UserCommandMsg
extends Msg

Message sent when user types a /-command or ordinary text


Field Summary
static MessageInfo info
          Message information for scripting system.
 
Fields inherited from class leafchat.core.api.Msg
PRIORITY_AFTERNORMAL, PRIORITY_BEFORENORMAL, PRIORITY_EARLY, PRIORITY_FIRST, PRIORITY_LAST, PRIORITY_LATE, PRIORITY_NORMAL
 
Constructor Summary
UserCommandMsg(Server server, java.lang.String command, java.lang.String params, java.lang.String contextChan, IRCUserAddress contextUser, MessageDisplay md)
           
 
Method Summary
 void error(java.lang.String s)
          Call when there is an error in what the user's typed.
 java.lang.String getCommand()
           
 java.lang.String getContextChan()
           
 IRCUserAddress getContextUser()
           
 MessageDisplay getMessageDisplay()
           
 java.lang.String getParams()
           
 Server getServer()
           
 
Methods inherited from class leafchat.core.api.Msg
isHandled, isStopped, markHandled, markStopped, sequenceBefore, setSequence, setSequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

info

public static MessageInfo info
Message information for scripting system.

Constructor Detail

UserCommandMsg

public UserCommandMsg(Server server,
                      java.lang.String command,
                      java.lang.String params,
                      java.lang.String contextChan,
                      IRCUserAddress contextUser,
                      MessageDisplay md)
Parameters:
server - Server for command (null if none)
command - Slash-command (null if none)
params - Parameters to command (empty string if none)
contextChan - Context chan (or null)
contextUser - Context nick/user (or null)
md - Context UI object (e.g. a channel window or something) which will be used to generate error messages resulting directly from this command.
Method Detail

error

public void error(java.lang.String s)
Call when there is an error in what the user's typed. Stops message processing and displays the error.

Parameters:
s - Text of error

getMessageDisplay

public MessageDisplay getMessageDisplay()
Returns:
Message display for window command was issued in

getServer

public Server getServer()
Returns:
Server that command should run on (null if none)

getCommand

public java.lang.String getCommand()
Returns:
Command in lower-case, or null if none

getParams

public java.lang.String getParams()
Returns:
Parameters, or empty string if none

getContextChan

public java.lang.String getContextChan()
Returns:
Context chan (null if none)

getContextUser

public IRCUserAddress getContextUser()
Returns:
Context user (null if none)


Copyright © 2011 Samuel Marshall. All rights reserved.