Class FactoidPlugin

java.lang.Object
  extended by FactoidPlugin
All Implemented Interfaces:
Plugin

public class FactoidPlugin
extends java.lang.Object
implements Plugin

Allows the bot to respond with factoids. *

Commands available
seeView a factoid
listList factoids
tellTell a specific user about a factoid
detailsDisplay factoid details
add*Add a factoid
delete*Delete a factoid
replace*Replace a factoid
* restricted

Author:
Khalid

Field Summary
static java.lang.String FACTOIDS_FILE
           
 
Constructor Summary
FactoidPlugin()
           
 
Method Summary
 void executeAdd(IrcCommandEvent ice)
           
 void executeDelete(IrcCommandEvent ice)
           
 void executeDetails(IrcCommandEvent ice)
           
 void executeHelp(IrcCommandEvent ice)
           
 void executeList(IrcCommandEvent ice)
           
 void executeReplace(IrcCommandEvent ice)
           
 void executeSee(IrcCommandEvent ice)
           
 void executeTell(IrcCommandEvent ice)
           
 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 sendMessage(IrcCommandEvent ice, java.lang.String message)
           
 void sendNotice(IrcCommandEvent ice, java.lang.String message)
           
 void updateXml(IrcCommandEvent ice)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTOIDS_FILE

public static final java.lang.String FACTOIDS_FILE
See Also:
Constant Field Values
Constructor Detail

FactoidPlugin

public FactoidPlugin()
              throws java.lang.Exception
Throws:
java.lang.Exception
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

sendMessage

public void sendMessage(IrcCommandEvent ice,
                        java.lang.String message)

sendNotice

public void sendNotice(IrcCommandEvent ice,
                       java.lang.String message)

executeSee

public void executeSee(IrcCommandEvent ice)

executeTell

public void executeTell(IrcCommandEvent ice)

executeDetails

public void executeDetails(IrcCommandEvent ice)

executeList

public void executeList(IrcCommandEvent ice)

executeAdd

public void executeAdd(IrcCommandEvent ice)

executeDelete

public void executeDelete(IrcCommandEvent ice)

executeReplace

public void executeReplace(IrcCommandEvent ice)

executeHelp

public void executeHelp(IrcCommandEvent ice)

updateXml

public void updateXml(IrcCommandEvent ice)