public class PingEvent extends Event implements GenericCTCPEvent
CoreHooks
automatically responds correctly. Unless CoreHooks
is removed from the
bot's ListenerManager
,
Listeners of this event should not send a response as the user will
get two responses
Constructor and Description |
---|
PingEvent(PircBotX bot,
UserHostmask userHostmask,
User user,
Channel channel,
String pingValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Channel |
getChannel()
The channel that received the ping request.
|
String |
getPingValue()
The value that was supplied as an argument to the PING command.
|
User |
getUser()
The user that sent the PING request.
|
UserHostmask |
getUserHostmask()
The user that sent the PING request.
|
int |
hashCode() |
void |
respond(String response)
Respond with a CTCP response to the user
|
String |
toString() |
compareTo, getBot, getId, getTimestamp
getBot, getTimestamp
compareTo
public PingEvent(PircBotX bot, @NonNull UserHostmask userHostmask, User user, Channel channel, @NonNull String pingValue)
public void respond(String response)
respond
in interface GenericEvent
respond
in class Event
response
- The response to send@Generated(value="lombok") public String getPingValue()
@Generated(value="lombok") public UserHostmask getUserHostmask()
getUserHostmask
in interface GenericUserEvent
@Nullable @Generated(value="lombok") public User getUser()
getUser
in interface GenericUserEvent
@Generated(value="lombok") public Channel getChannel()
null
means the target was us.getChannel
in interface GenericChannelEvent
Copyright © 2010–2020 Leon Blakey. All rights reserved.