org.xnap.plugin.pircbot
Class PircBotChannel

java.lang.Object
  extended by org.xnap.chat.AbstractChannel
      extended by org.xnap.plugin.pircbot.PircBotChannel
All Implemented Interfaces:
Channel, ChannelInfo, TopicChangable

public class PircBotChannel
extends AbstractChannel
implements TopicChangable


Field Summary
 
Fields inherited from class org.xnap.chat.AbstractChannel
cs
 
Fields inherited from interface org.xnap.chat.Channel
AWAY_MESSAGE_INTERVAL
 
Constructor Summary
PircBotChannel(PircBotServer server, java.lang.String name)
           
 
Method Summary
 void changeTopic(java.lang.String topic)
          Invoked when the topic is requested to change.
 void close()
          Invoked by the ChatManager when the channel is removed.
 javax.swing.Action[] getActions()
          Returns an array of actions that can be performed on the channel.
 Command[] getCommands()
          Returns null.
 javax.swing.Icon getIcon()
          Returns null.
 javax.swing.Action[] getPeerActions(Peer peer)
          Returns an array of peer specific actions.
 java.lang.String getPrefix(Peer peer)
          Returns the empty string.
 ChatProvider getProvider()
          Returns a reference to the chat provider.
 PircBotServer getServer()
           
 boolean isJoined()
          Returns true, if the channel is joined.
 boolean isLocal(Peer peer)
          Returns true, if peer is the local peer.
 void sendMessage(java.lang.String message)
          Sends a message to this channel.
 void setJoined(boolean joined, java.lang.String reason)
           
 void setOp(Peer peer, boolean isOperator)
           
 void setVoice(Peer peer, boolean hasVoice)
           
 
Methods inherited from class org.xnap.chat.AbstractChannel
actionMessageReceived, add, addChannelListener, errorReceived, getName, getPeerCount, getPeers, getTopic, infoReceived, joined, messageReceived, parted, peerChanged, remove, removeChannelListener, setTopic, topicChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PircBotChannel

public PircBotChannel(PircBotServer server,
                      java.lang.String name)
Method Detail

close

public void close()
Description copied from interface: Channel
Invoked by the ChatManager when the channel is removed.

Specified by:
close in interface Channel

changeTopic

public void changeTopic(java.lang.String topic)
Description copied from interface: TopicChangable
Invoked when the topic is requested to change.

Specified by:
changeTopic in interface TopicChangable

getIcon

public javax.swing.Icon getIcon()
Description copied from class: AbstractChannel
Returns null.

Specified by:
getIcon in interface Channel
Overrides:
getIcon in class AbstractChannel
See Also:
PircBotPlugin.ICON_16.

getActions

public javax.swing.Action[] getActions()
Description copied from interface: Channel
Returns an array of actions that can be performed on the channel.

Specified by:
getActions in interface Channel

getCommands

public Command[] getCommands()
Description copied from class: AbstractChannel
Returns null.

Specified by:
getCommands in interface Channel
Overrides:
getCommands in class AbstractChannel

getPeerActions

public javax.swing.Action[] getPeerActions(Peer peer)
Description copied from interface: Channel
Returns an array of peer specific actions.

This can be used to implement channel operations like "op".

Specified by:
getPeerActions in interface Channel

getPrefix

public java.lang.String getPrefix(Peer peer)
Description copied from class: AbstractChannel
Returns the empty string.

Specified by:
getPrefix in interface Channel
Overrides:
getPrefix in class AbstractChannel

getProvider

public ChatProvider getProvider()
Description copied from interface: Channel
Returns a reference to the chat provider.

Specified by:
getProvider in interface Channel
Returns:
null, if the channel has no provider; the provider, otherwise

getServer

public PircBotServer getServer()

isJoined

public boolean isJoined()
Description copied from interface: Channel
Returns true, if the channel is joined.

Specified by:
isJoined in interface Channel

isLocal

public boolean isLocal(Peer peer)
Description copied from interface: Channel
Returns true, if peer is the local peer. XNap does not beep if messages are received from local peers.

Specified by:
isLocal in interface Channel

sendMessage

public void sendMessage(java.lang.String message)
Description copied from interface: Channel
Sends a message to this channel.

Specified by:
sendMessage in interface Channel

setJoined

public void setJoined(boolean joined,
                      java.lang.String reason)

setOp

public void setOp(Peer peer,
                  boolean isOperator)

setVoice

public void setVoice(Peer peer,
                     boolean hasVoice)


Copyright © 2001-2005 XNap Team. All Rights Reserved.