de.berlios.suzy.irc
Interface Plugin

All Known Subinterfaces:
PerformOnConnectPlugin
All Known Implementing Classes:
ApiPlugin, FactoidPlugin, GooglePlugin, HelpPlugin, JoinChannelPlugin, LoaderPlugin, QuakenetAuthPlugin, TestPlugin

public interface Plugin

An extension for the irc client. Plugins may be loaded and unloaded at runtime. Plugins must either offer the default constructor or a constructor with 1 String as argument. This will be called preferably (default is fallback). The argument will be the network name.
Plugins have to be in the default package in order to be loaded.

Author:
honk

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.
 

Method Detail

getCommands

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

Returns:
a list of commands handled by this plugin

getRestrictedCommands

java.lang.String[] getRestrictedCommands()
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.

Returns:
a list of restricted commands handled by this plugin

handleEvent

void handleEvent(IrcCommandEvent ice)
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.

Parameters:
ice - the Event that occured