public class PrivateCtcpQueryEvent extends ActorPrivateMessageEventBase<User> implements ActorMessageEvent<User>, CtcpEvent
ActorMessageEventBase.getMessage()
returns the
unescaped message with the delimiter removed. Note that the reply is not
sent if the target is not the client.
See PrivateCtcpReplyEvent
for received CTCP replies.
Constructor and Description |
---|
PrivateCtcpQueryEvent(@NonNull Client client,
@NonNull ServerMessage sourceMessage,
@NonNull User sender,
@NonNull String target,
@NonNull String message,
@Nullable String reply)
Creates the event
|
Modifier and Type | Method and Description |
---|---|
@NonNull Optional<String> |
getReply()
Gets the reply to be sent to the CTCP sender.
|
void |
setReply(@Nullable String reply)
Sets the reply to send to the CTCP sender.
|
protected @NonNull ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getTarget, isToClient
getMessage
getActor
getSource
getClient, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getActor
getCommand
getMessage
getSource, getTag, getTag, getTags
getClient
public PrivateCtcpQueryEvent(@NonNull Client client, @NonNull ServerMessage sourceMessage, @NonNull User sender, @NonNull String target, @NonNull String message, @Nullable String reply)
client
- client for which this is occurringsourceMessage
- source messagesender
- sender of the querytarget
- target of the querymessage
- message sentreply
- reply to be sent, if anypublic @NonNull Optional<String> getReply()
public void setReply(@Nullable String reply)
Client.sendCtcpReply(String, String)
.reply
- message to send backprotected @NonNull ToStringer toStringer()
ClientEventBase
ToStringer
for the command.toStringer
in class ActorPrivateMessageEventBase<User>
Copyright © 2013–2021 Kitteh. All rights reserved.