public class Channel
extends java.lang.Object
Session
,
Session.getChannel(String)
,
Session.getChannels()
,
JoinCompleteEvent
Constructor and Description |
---|
Channel(java.lang.String name,
Session session)
This should only be used internally and for testing
|
Modifier and Type | Method and Description |
---|---|
void |
action(java.lang.String text)
Send an action
|
void |
addNick(java.lang.String nick)
This method is for internal use only
|
void |
deop(java.lang.String userName)
DeOp a user
|
void |
deVoice(java.lang.String userName)
Devoice a user
|
boolean |
equals(java.lang.Object o) |
java.util.List<ModeAdjustment> |
getChannelModes()
Returns a list of modes that apply to the channel but dont apply
to users in the channel.
|
java.lang.String |
getName()
Gets the Channel name.
|
java.util.List<java.lang.String> |
getNicks()
Gets a list of nicks for Channel.
|
java.util.List<java.lang.String> |
getNicksForMode(ModeAdjustment.Action action,
char mode)
Gets a list of users in channel with a given mode set.
|
Session |
getSession()
Return the Session this Channel belongs to
|
java.lang.String |
getTopic()
Gets the topic for the channel or an empty string is the topic is not set.
|
java.lang.String |
getTopicSetter()
Gets the nick of who set the topic or an empty string if the topic is not set.
|
java.util.Date |
getTopicSetTime()
Returns the Date the topic was set or null if the topic is unset.
|
java.util.List<ModeAdjustment> |
getUsersModes(java.lang.String nick)
Get a list of user's channel modes
Returns an empty list if the nick does not exist.
|
int |
hashCode() |
void |
kick(java.lang.String userName,
java.lang.String reason)
Kick a user
|
void |
mode(java.lang.String mode)
Sets a mode in the Channel if you have the permissions to do so.
|
void |
names()
Send a names query to the server
|
void |
notice(java.lang.String message)
Send a notice in the Channel
|
void |
op(java.lang.String userName)
Op a user
|
void |
part(java.lang.String partMsg)
Part the channel
|
void |
say(java.lang.String message)
Speak in the Channel.
|
void |
setTopic(java.lang.String topic)
Sets the topic of the Channel is you have the permissions to do so.
|
void |
setTopicEvent(TopicEvent topicEvent)
This method should only be used internally
|
java.lang.String |
toString() |
void |
voice(java.lang.String userName)
Voice a user
|
public Channel(java.lang.String name, Session session)
name
- - Name of Channelsession
- - Session Channel belongs topublic java.util.List<ModeAdjustment> getUsersModes(java.lang.String nick)
nick
- public java.util.List<java.lang.String> getNicksForMode(ModeAdjustment.Action action, char mode)
action
- mode
- public java.util.List<ModeAdjustment> getChannelModes()
public void mode(java.lang.String mode)
mode
- to set.public java.lang.String getTopic()
public java.lang.String getTopicSetter()
public java.util.Date getTopicSetTime()
public void setTopic(java.lang.String topic)
topic
- to use.public void setTopicEvent(TopicEvent topicEvent)
topicEvent
- public java.lang.String getName()
public void say(java.lang.String message)
message
- - what to saypublic void notice(java.lang.String message)
message
- - notice messgaepublic void addNick(java.lang.String nick)
nick
- to addpublic java.util.List<java.lang.String> getNicks()
public void part(java.lang.String partMsg)
partMsg
- public void action(java.lang.String text)
text
- action textpublic void names()
public void deVoice(java.lang.String userName)
userName
- public void voice(java.lang.String userName)
userName
- public void op(java.lang.String userName)
userName
- public void deop(java.lang.String userName)
userName
- public void kick(java.lang.String userName, java.lang.String reason)
userName
- reason
- public Session getSession()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object