|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleafchat.core.api.Msg
com.leafdigital.irc.api.UserCommandListMsg
public class UserCommandListMsg
Message sent to get a list of available / commands.
Field Summary | |
---|---|
static int |
FREQ_COMMON
Command is frequently typed by ordinary users. |
static int |
FREQ_OBSCURE
Command is used only by IRC operators, is normally handled internally by clients, or is normally used only when scripting. |
static int |
FREQ_UNCOMMON
Command may be typed by ordinary users, but is used less frequently. |
Fields inherited from class leafchat.core.api.Msg |
---|
PRIORITY_AFTERNORMAL, PRIORITY_BEFORENORMAL, PRIORITY_EARLY, PRIORITY_FIRST, PRIORITY_LAST, PRIORITY_LATE, PRIORITY_NORMAL |
Constructor Summary | |
---|---|
UserCommandListMsg()
Used to retrieve all commands, regardless of whether currently connected to a server or not. |
|
UserCommandListMsg(Server server)
Used to retrieve commands that are appropriate for current server. |
Method Summary | |
---|---|
void |
addCommand(boolean onServer,
java.lang.String command,
int freq,
java.lang.String example,
java.lang.String explanation)
Adds a supported command to the list. |
java.lang.String[] |
getCommands()
For use by whoever despatched the message, after its despatch. |
java.lang.String |
getDescription(java.lang.String command)
For user by whoever despatched the message, after its despatch. |
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 |
---|
public static final int FREQ_COMMON
public static final int FREQ_UNCOMMON
public static final int FREQ_OBSCURE
Constructor Detail |
---|
public UserCommandListMsg(Server server)
server
- Server for command (null if none)public UserCommandListMsg()
Method Detail |
---|
public Server getServer()
public java.lang.String[] getCommands()
public java.lang.String getDescription(java.lang.String command)
command
- Command (must be lower-case with no slash)
public void addCommand(boolean onServer, java.lang.String command, int freq, java.lang.String example, java.lang.String explanation)
onServer
- True if command only applies when connected to a servercommand
- Command (not including /)freq
- Frequency (FREQ_xx constant)example
- Example command (plain text)explanation
- Explanation of what the example command does (XML)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |