anecho.JamochaMUD.plugins
Class Trigger

java.lang.Object
  extended by anecho.JamochaMUD.plugins.Trigger
All Implemented Interfaces:
PlugInterface

public class Trigger
extends java.lang.Object
implements PlugInterface

This plug-in allows users to set highlights and gags based on incoming text from the connect MU*s.


Field Summary
static java.lang.String AND
           
static java.lang.String COLOUR
           
static java.lang.String DONE
           
static java.lang.String GAG
           
static java.lang.String LAUNCH
           
static java.lang.String MATCHONLY
           
static java.lang.String MEDIA
           
static java.lang.String MODIFIER
           
static java.lang.String NAME
           
static java.lang.String NONE
           
static java.lang.String NOT
           
static java.lang.String RULENAME
           
static java.lang.String RULES
           
static java.lang.String TRIGGERSTR
           
 
Constructor Summary
Trigger()
          Creates a new instance of Trigger This method is here for the sake of "proper" code
 
Method Summary
 void activate()
          This function tells the plug-in that it should be functioning.
 void deactivate()
          The method deactivates the plug-in
 boolean hasProperties()
          This tells the main program whether the plug-in has user-accessible properties.
 boolean haveConfig()
          Returns whether there is a (GUI) configuration available for the plug-in.
 void initialiseAtLoad()
          This method initialises any variables needed by the plug-in audStream soon audStream it is loaded.
 boolean isActive()
          Allows JamochaMUD to check whether this plug-in is active and should be used.
 java.lang.String plugInDescription()
          This method returns a String with a brief description of the plug-in's function.
 java.lang.String plugInName()
          This returns the name of the plug-in for display to the user.
 void plugInProperties()
          Displays properties for the plug-in that users can adjust.
 java.lang.String plugInType()
          Type of plug-in: input, output, or other.
 java.lang.String plugMain(java.lang.String jamochaString, MuSocket mSock)
          The main method of the plug-in.
 void setAtHalt()
          This is called when JamochaMUD stops, and can be used for any final clean-up, file saving, etc.
 void setSettings(JMConfig settings)
           
 void writeRulesToFile(java.util.Vector newRules)
          Upon approval by the user, we'll write the rules back to the file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RULES

public static final java.lang.String RULES
See Also:
Constant Field Values

RULENAME

public static final java.lang.String RULENAME
See Also:
Constant Field Values

COLOUR

public static final java.lang.String COLOUR
See Also:
Constant Field Values

LAUNCH

public static final java.lang.String LAUNCH
See Also:
Constant Field Values

MATCHONLY

public static final java.lang.String MATCHONLY
See Also:
Constant Field Values

MEDIA

public static final java.lang.String MEDIA
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

TRIGGERSTR

public static final java.lang.String TRIGGERSTR
See Also:
Constant Field Values

DONE

public static final java.lang.String DONE
See Also:
Constant Field Values

MODIFIER

public static final java.lang.String MODIFIER
See Also:
Constant Field Values

NOT

public static final java.lang.String NOT
See Also:
Constant Field Values

AND

public static final java.lang.String AND
See Also:
Constant Field Values

NONE

public static final java.lang.String NONE
See Also:
Constant Field Values

GAG

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

Trigger

public Trigger()
Creates a new instance of Trigger This method is here for the sake of "proper" code

Method Detail

activate

public void activate()
Description copied from interface: PlugInterface
This function tells the plug-in that it should be functioning. See Deactive() for the inverse function. activate may be called more than once.

Specified by:
activate in interface PlugInterface

deactivate

public void deactivate()
The method deactivates the plug-in

Specified by:
deactivate in interface PlugInterface

isActive

public boolean isActive()
Description copied from interface: PlugInterface
Allows JamochaMUD to check whether this plug-in is active and should be used.

Specified by:
isActive in interface PlugInterface
Returns:

hasProperties

public boolean hasProperties()
This tells the main program whether the plug-in has user-accessible properties.

Specified by:
hasProperties in interface PlugInterface
Returns:
True indicates properties are available, false indicates none

initialiseAtLoad

public void initialiseAtLoad()
This method initialises any variables needed by the plug-in audStream soon audStream it is loaded.

Specified by:
initialiseAtLoad in interface PlugInterface

plugInDescription

public java.lang.String plugInDescription()
This method returns a String with a brief description of the plug-in's function.

Specified by:
plugInDescription in interface PlugInterface
Returns:
The description of the plug-in.

plugInName

public java.lang.String plugInName()
This returns the name of the plug-in for display to the user.

Specified by:
plugInName in interface PlugInterface
Returns:
The human-readable name of the plug-in

plugInProperties

public void plugInProperties()
Displays properties for the plug-in that users can adjust.

Specified by:
plugInProperties in interface PlugInterface

plugInType

public java.lang.String plugInType()
Type of plug-in: input, output, or other.

Specified by:
plugInType in interface PlugInterface
Returns:

plugMain

public java.lang.String plugMain(java.lang.String jamochaString,
                                 MuSocket mSock)
The main method of the plug-in.

Specified by:
plugMain in interface PlugInterface
Parameters:
jamochaString - The incoming String
mSock - This is the socket this String belongs to
Returns:
The new string after being processed for triggers, etc.

setAtHalt

public void setAtHalt()
This is called when JamochaMUD stops, and can be used for any final clean-up, file saving, etc.

Specified by:
setAtHalt in interface PlugInterface

haveConfig

public boolean haveConfig()
Returns whether there is a (GUI) configuration available for the plug-in.

Specified by:
haveConfig in interface PlugInterface
Returns:
true This plug-in has a configuration GUI

setSettings

public void setSettings(JMConfig settings)
Parameters:
settings -

writeRulesToFile

public void writeRulesToFile(java.util.Vector newRules)
Upon approval by the user, we'll write the rules back to the file

Parameters:
newRules -