de.berlios.suzy.irc
Class LoaderPlugin

java.lang.Object
  extended by de.berlios.suzy.irc.LoaderPlugin
All Implemented Interfaces:
Plugin

public class LoaderPlugin
extends java.lang.Object
implements Plugin

This plugin is responsible for loading and unloading other plugins at runtime. It will also keep a list of loaded plugins.
A LoaderPlugin cannot be loaded at Runtime.

Commands available
load*loads a plugin
unload*unloads a plugin
commandsshows all commands that are not access restricted
allcommands*shows all commands
* restricted

Author:
honk

Constructor Summary
LoaderPlugin(java.lang.String network)
          Creates a new instance.
 
Method Summary
 java.lang.String[] getCommands()
          A list of commands that this plugins want to handle.
 java.util.List<PerformOnConnectPlugin> getPerformOnConnectList()
          Returns a List containing all plugins that expect to be called whenever a new irc connection is opened.
 java.util.Map<java.lang.String,Plugin> getPluginList()
          Returns a mapping of commands and Plugins executing these.
 java.lang.String[] getRestrictedCommands()
          A list of restricted commands that this plugins want to handle.
 java.util.Map<java.lang.String,Plugin> getRestrictedPluginList()
          Returns a mapping of access restricted commands and Plugins executing these.
 void handleEvent(IrcCommandEvent ice)
          This method will be called whenever an event this plugin can handle occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoaderPlugin

public LoaderPlugin(java.lang.String network)
Creates a new instance. The plugin lists in new instance will contain this plugin as well as all plugins specified by the plugins.conf

Method Detail

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

getPerformOnConnectList

public java.util.List<PerformOnConnectPlugin> getPerformOnConnectList()
Returns a List containing all plugins that expect to be called whenever a new irc connection is opened.

Returns:
a list of loaded plugins which want to perform something on connect

getPluginList

public java.util.Map<java.lang.String,Plugin> getPluginList()
Returns a mapping of commands and Plugins executing these.

Returns:
a mapping of commands and Plugins executing these.

getRestrictedPluginList

public java.util.Map<java.lang.String,Plugin> getRestrictedPluginList()
Returns a mapping of access restricted commands and Plugins executing these.

Returns:
a mapping of access restricted commands and Plugins executing these.