|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjerklib.Channel
public class Channel
A Class to represent a joined IRC channel. This class has methods to interact with IRC Channels like say() , part() , getChannelModes() etc. You will never need to create an instance of this class manually. Instead it will be created for you and stored in the Session when you successfully join a channel.
Session
,
Session.getChannel(String)
,
Session.getChannels()
,
JoinCompleteEvent
Constructor Summary | |
---|---|
Channel(String name,
Session session)
This should only be used internally and for testing |
Method Summary | |
---|---|
void |
action(String text)
Send an action |
void |
addNick(String nick)
This method is for internal use only |
void |
deop(String userName)
DeOp a user |
void |
deVoice(String userName)
Devoice a user |
boolean |
equals(Object o)
|
List<ModeAdjustment> |
getChannelModes()
Returns a list of modes that apply to the channel but dont apply to users in the channel. |
String |
getName()
Gets the Channel name. |
List<String> |
getNicks()
Gets a list of nicks for Channel. |
List<String> |
getNicksForMode(ModeAdjustment.Action action,
char mode)
Gets a list of user in channel with a given mode set. |
Session |
getSession()
Return the Session this Channel belongs to |
String |
getTopic()
Gets the topic for the channel or an empty string is the topic is not set. |
String |
getTopicSetter()
Gets the nick of who set the topic or an empty string if the topic is not set. |
Date |
getTopicSetTime()
Returns the Date the topic was set or null if the topic is unset. |
List<ModeAdjustment> |
getUsersModes(String nick)
Get a list of user's channel modes Returns an empty list if the nick does not exist. |
int |
hashCode()
|
void |
kick(String userName,
String reason)
Kick a user |
void |
mode(String mode)
Sets a mode in the Channel is you have the permissions to do so. |
void |
names()
Send a names query to the server |
void |
notice(String message)
Send a notice in the Channel |
void |
op(String userName)
Op a user |
void |
part(String partMsg)
Part the channel |
void |
say(String message)
Speak in the Channel. |
void |
setTopic(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 |
String |
toString()
|
void |
voice(String userName)
Voice a user |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Channel(String name, Session session)
name
- - Name of Channelsession
- - Session Channel belongs toMethod Detail |
---|
public List<ModeAdjustment> getUsersModes(String nick)
nick
-
public List<String> getNicksForMode(ModeAdjustment.Action action, char mode)
action
- mode
-
public List<ModeAdjustment> getChannelModes()
public void mode(String mode)
mode
- to set.public String getTopic()
public String getTopicSetter()
public Date getTopicSetTime()
public void setTopic(String topic)
topic
- to use.public void setTopicEvent(TopicEvent topicEvent)
topicEvent
- public String getName()
public void say(String message)
message
- - what to saypublic void notice(String message)
message
- - notice messgaepublic void addNick(String nick)
nick
- to addpublic List<String> getNicks()
public void part(String partMsg)
partMsg
- public void action(String text)
text
- action textpublic void names()
public void deVoice(String userName)
userName
- public void voice(String userName)
userName
- public void op(String userName)
userName
- public void deop(String userName)
userName
- public void kick(String userName, String reason)
userName
- reason
- public Session getSession()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |