Class JoinChannelPlugin

java.lang.Object
  extended by JoinChannelPlugin
All Implemented Interfaces:
PerformOnConnectPlugin, Plugin

public class JoinChannelPlugin
extends java.lang.Object
implements PerformOnConnectPlugin

This channel joins a predefined set of channels when the client connects to irc. There are also commands to join and part channels manually

Commands available
join*joins a channel
part*parts a channel
* restricted

Author:
honk

Constructor Summary
JoinChannelPlugin(java.lang.String server)
          creates a new instance that will join the channels for this server as specified in channels_server.conf
 
Method Summary
 java.lang.String[] getCommands()
          A list of commands that this plugins want to handle.
 java.lang.String[] getRestrictedCommands()
          A list of restricted commands that this plugins want to handle.
 void handleEvent(IrcCommandEvent ice)
          This method will be called whenever an event this plugin can handle occurs.
 void perform(IrcSender ircSender)
          This method will be called when a new connection to an irc server is made, if the plugin is loaded at that time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinChannelPlugin

public JoinChannelPlugin(java.lang.String server)
creates a new instance that will join the channels for this server as specified in channels_server.conf

Parameters:
server - server to load channels for
Method Detail

perform

public void perform(IrcSender ircSender)
Description copied from interface: PerformOnConnectPlugin
This method will be called when a new connection to an irc server is made, if the plugin is loaded at that time.

Specified by:
perform in interface PerformOnConnectPlugin
Parameters:
ircSender - a sender that is capable of sending text to server that the connection was made to.

getCommands

public java.lang.String[] getCommands()
Description copied from interface: Plugin
A list of commands that this plugins want to handle. Each command has to be plain text without any prefixes.

Specified by:
getCommands in interface Plugin
Returns:
a list of commands handled by this plugin

getRestrictedCommands

public java.lang.String[] getRestrictedCommands()
Description copied from interface: Plugin
A list of restricted commands that this plugins want to handle. Each command has to be plain text without any prefixes. The access will only be allowed if the user has access to the admin functions.

Specified by:
getRestrictedCommands in interface Plugin
Returns:
a list of restricted commands handled by this plugin

handleEvent

public void handleEvent(IrcCommandEvent ice)
Description copied from interface: Plugin
This method will be called whenever an event this plugin can handle occurs. The IrcCommandEvent will hold the information necessary to find out which command was called.

Specified by:
handleEvent in interface Plugin
Parameters:
ice - the Event that occured