public class OutputChannel extends Object implements GenericChannelUserOutput
Constructor and Description |
---|
OutputChannel(PircBotX bot,
Channel channel) |
Modifier and Type | Method and Description |
---|---|
void |
action(String action)
Send an action to the channel.
|
void |
ban(String hostmask)
Bans a user from a channel.
|
void |
ctcpCommand(String command)
Send a CTCP command to the channel.
|
void |
cycle()
Part and rejoin specified channel.
|
void |
cycle(String key)
Part and rejoin specified channel using channel key.
|
void |
deHalfOp(UserHostmask user)
Removes owner privileges to a user on a channel.
|
void |
deOp(UserHostmask user)
Removes operator privileges from a user on a channel.
|
void |
deOwner(UserHostmask user)
Removes owner privileges to a user on a channel.
|
void |
deSuperOp(UserHostmask user)
Removes superOp privileges to a user on a channel.
|
void |
deVoice(UserHostmask user)
Removes voice privileges from a user on a channel.
|
void |
getMode() |
void |
halfOp(UserHostmask user)
Grants owner privileges to a user on a channel.
|
void |
invite(Channel otherChannel)
Send an invite for this channel to another channel.
|
void |
invite(String target)
Send an invite from this channel to a channel or user.
|
void |
invite(UserHostmask user)
Send an invite from this channel to a user
|
void |
kick(UserHostmask user)
Kicks a user from a channel.
|
void |
kick(UserHostmask user,
String reason)
Kicks a user from a channel, giving a reason.
|
void |
message(String message)
Send a message to the channel.
|
void |
message(UserHostmask user,
String message)
Send a message to the given user in the given channel in this format:
user: message . |
void |
notice(String notice)
Send a notice to the channel.
|
void |
op(UserHostmask user)
Grants operator privileges to a user on a channel.
|
void |
owner(UserHostmask user)
Grants owner privileges to a user on a channel.
|
void |
part()
Parts a channel.
|
void |
part(String reason)
Parts a channel, giving a reason.
|
void |
removeChannelKey(String key)
Removes the channel key (-k) or password to get into the channel.
|
void |
removeChannelLimit()
Attempt to remove the channel limit (-l) on the specified channel.
|
void |
removeChannelPrivate()
Removes private (-p) status from the channel.
|
void |
removeInviteOnly()
Removes invite only (-i) status from the channel.
|
void |
removeModerated()
Removes moderated (-m) status from the channel.
|
void |
removeNoExternalMessages()
Allow external messages to appear in the channel (+n).
|
void |
removeSecret()
Removes secret (-s) status from the channel.
|
void |
removeTopicProtection()
Allow non-operator users to change the channel topic (-t).
|
void |
setChannelKey(String key)
Sets the channel key (+k) or password to get into the channel.
|
void |
setChannelLimit(int limit)
Attempt to set the channel limit (+l) to specified value.
|
void |
setChannelPrivate()
Set the channel as private (+p).
|
void |
setInviteOnly()
Set the channel as invite only (+i).
|
void |
setMode(String mode)
Set the mode of a channel.
|
void |
setMode(String mode,
Object... args)
Set a mode for the channel with arguments.
|
void |
setMode(String mode,
UserHostmask user)
Set a mode for a user.
|
void |
setModerated()
Set the channel as moderated (+m).
|
void |
setNoExternalMessages()
Prevent external messages from appearing in the channel (+n).
|
void |
setSecret()
Set the channel as secret (+s).
|
void |
setTopic(String topic)
Set the topic for a channel.
|
void |
setTopicProtection()
Prevent non-operator users from changing the channel topic (+t).
|
void |
superOp(UserHostmask user)
Grants superOp privileges to a user on a channel.
|
void |
unBan(String hostmask)
Unbans a user from a channel.
|
void |
voice(UserHostmask user)
Grants voice privileges to a user on a channel.
|
void |
who() |
@ConstructorProperties(value={"bot","channel"}) @Generated(value="lombok") public OutputChannel(@NonNull PircBotX bot, @NonNull Channel channel)
public void part()
public void part(String reason)
reason
- The reason for parting the channel.public void message(String message)
message
in interface GenericChannelUserOutput
message
- The message to sendpublic void message(UserHostmask user, String message)
user: message
. Very useful for responding directly to a
commanduser
- The user to recieve the message in the channelmessage
- The message to sendpublic void action(String action)
action
in interface GenericChannelUserOutput
action
- The action message to sendpublic void notice(String notice)
notice
in interface GenericChannelUserOutput
notice
- The notice to sendpublic void invite(Channel otherChannel)
otherChannel
- The channel you are inviting the user to join.OutputIRC.invite(java.lang.String, java.lang.String)
public void invite(@NonNull UserHostmask user)
user
- OutputIRC.invite(java.lang.String, java.lang.String)
public void invite(@NonNull String target)
target
- OutputIRC.invite(java.lang.String, java.lang.String)
public void ctcpCommand(String command)
command
- The CTCP command to sendpublic void cycle()
public void cycle(String key)
key
- The key to use when rejoining the channelpublic void who()
public void getMode()
public void setMode(String mode)
mode
- The new mode to apply to the channel. This may include zero
or more arguments if necessary.op(org.pircbotx.UserHostmask)
public void setMode(String mode, Object... args)
setMode(java.lang.String)
for more informationmode
- The new mode to apply to the channel. This may include zero
or more arguments if necessary.args
- Arguments to be passed to the mode. All will be converted to
a string using Object.toString()
and added together with a
single space separating thempublic void setMode(String mode, UserHostmask user)
setMode(java.lang.String)
mode
- The new mode to apply to the channel.user
- The user to perform the mode change onsetMode(java.lang.String)
public void setChannelLimit(int limit)
limit
- The maximum amount of people that can be in the channelpublic void removeChannelLimit()
public void setChannelKey(String key)
key
- The secret key to usepublic void removeChannelKey(String key)
key
- The secret key to remove. If this is not known a blank key or
asterisk might workpublic void setInviteOnly()
public void removeInviteOnly()
public void setModerated()
public void removeModerated()
public void setNoExternalMessages()
public void removeNoExternalMessages()
public void setSecret()
public void removeSecret()
public void setTopicProtection()
public void removeTopicProtection()
public void setChannelPrivate()
public void removeChannelPrivate()
public void ban(String hostmask)
hostmask
- A hostmask representing the user we're banning.public void unBan(String hostmask)
hostmask
- A hostmask representing the user we're unbanning.public void op(UserHostmask user)
user
- The user we are opping.public void deOp(UserHostmask user)
user
- The user we are deopping.public void voice(UserHostmask user)
user
- The user we are voicing.public void deVoice(UserHostmask user)
user
- The user we are devoicing.public void halfOp(UserHostmask user)
Warning: Not all IRC servers support this. Some servers may even use it to mean something else!
user
- public void deHalfOp(UserHostmask user)
Warning: Not all IRC servers support this. Some servers may even use it to mean something else!
user
- public void owner(UserHostmask user)
Warning: Not all IRC servers support this. Some servers may even use it to mean something else!
user
- public void deOwner(UserHostmask user)
Warning: Not all IRC servers support this. Some servers may even use it to mean something else!
user
- public void superOp(UserHostmask user)
Warning: Not all IRC servers support this. Some servers may even use it to mean something else!
user
- public void deSuperOp(UserHostmask user)
Warning: Not all IRC servers support this. Some servers may even use it to mean something else!
user
- public void setTopic(String topic)
topic
- The new topic for the channel.public void kick(UserHostmask user)
user
- The user to kick.public void kick(UserHostmask user, String reason)
user
- The user to kick.reason
- A description of the reason for kicking a user.Copyright © 2010–2020 Leon Blakey. All rights reserved.