|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectf00f.net.irc.martyr.commands.AbstractInCommand
f00f.net.irc.martyr.commands.AbstractCommand
f00f.net.irc.martyr.commands.MessageCommand
f00f.net.irc.martyr.commands.CtcpMessage
public class CtcpMessage
This facilitates the sending and receiving of CTCP messages. Upon receiving a message, MessageCommand checks to see if it is a CTCP, and if it is, it instantiates this class instead of a MessageCommand. You can then use the getAction() and getMessage() methods to retreive the action and payload, respectively.
MessageCommand| Field Summary |
|---|
| Fields inherited from class f00f.net.irc.martyr.commands.AbstractInCommand |
|---|
attributes |
| Constructor Summary | |
|---|---|
protected |
CtcpMessage(FullNick from,
java.lang.String dest,
java.lang.String message)
This is only to be called by MessageCommand, as a way of receiving a Ctcp message. |
|
CtcpMessage(java.lang.String dest,
java.lang.String message)
Use this to send a CTCP message. |
|
CtcpMessage(java.lang.String dest,
java.lang.String action,
java.lang.String message)
|
| Method Summary | |
|---|---|
java.lang.String |
getAction()
Returns the action of this CTCP. |
static java.lang.String |
getActionStr(java.lang.String msg)
Given a stripped CTCP message, returns the ctcp action string. |
static java.lang.String |
getMessageStr(java.lang.String msg)
|
static boolean |
isCtcpString(java.lang.String msg)
If the string is wrapped with CTCP signal chars (\001) returns true. |
static java.lang.String |
stripCtcpWrapper(java.lang.String msg)
Strips a CTCP wrapper, if there is one. |
| Methods inherited from class f00f.net.irc.martyr.commands.MessageCommand |
|---|
getDest, getIrcIdentifier, getMessage, getSource, isPrivateToUs, parse, renderParams |
| Methods inherited from class f00f.net.irc.martyr.commands.AbstractCommand |
|---|
render |
| Methods inherited from class f00f.net.irc.martyr.commands.AbstractInCommand |
|---|
getAttribute, getAttributeKeys, getIntParameter, getParameter, getSourceString, getState, selfRegister, setAttribute, setSourceString, updateClientState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CtcpMessage(java.lang.String dest,
java.lang.String message)
dest - Target of CTCP messagemessage - Actual CTCP message
public CtcpMessage(java.lang.String dest,
java.lang.String action,
java.lang.String message)
protected CtcpMessage(FullNick from,
java.lang.String dest,
java.lang.String message)
from - Nick that sent the messagedest - Target of the CTCP messagemessage - Actual CTCP message| Method Detail |
|---|
public java.lang.String getAction()
public static java.lang.String getActionStr(java.lang.String msg)
msg - Message to be parsed into an action
public static java.lang.String getMessageStr(java.lang.String msg)
public static boolean isCtcpString(java.lang.String msg)
msg - String to check whether it's a CTCP message or not
public static java.lang.String stripCtcpWrapper(java.lang.String msg)
msg - String to be stripped
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||