ircbot.modules

Class Wiki

Implemented Interfaces:
Comparable, IRCBotModule

public class Wiki
extends AbstractIRCBotModule

Constructor Summary

Wiki()

Method Summary

String
action(IRCMessage message)
action is invoked by the bot when someone types a message starting with a member of getCommands().
String
getAuthor()
String
getDescription(String topic, Language lang)
getDescription is called to get the information printed by the !help command.
String
getModuleName()
getModuleName is called to get the name of this module.

Methods inherited from class ircbot.AbstractIRCBotModule

activateEvent, addCommand, compareTo, getCommands, getModuleHandler, getProbability, loadState, parseMessage, randomThought, saveState, scheduleEvent, scheduleEvent, setModuleHandler, toString

Constructor Details

Wiki

public Wiki()

Method Details

action

public String action(IRCMessage message)
action is invoked by the bot when someone types a message starting with a member of getCommands().
Specified by:
action in interface IRCBotModule
Parameters:
message - The original message sent to the channel. Provided if some command needs further information from it, like for instance the nick of the sender.
Returns:
A String containing a message to be sent to the IRC channel as a reply to the command invocation or null if no reply is needed.

getAuthor

public String getAuthor()
Specified by:
getAuthor in interface IRCBotModule

getDescription

public String getDescription(String topic,
                             Language lang)
getDescription is called to get the information printed by the !help command.
Specified by:
getDescription in interface IRCBotModule
Parameters:
topic - Either the string returned by getModuleName().toLowerCase() or a member of getCommands(). The convention says that the call getDescription(getModuleName().toLowerCase()) should return a brief description about the module. This information should not overlap with information given by calls where the topic is a member of getCommands().
lang - What language to use for the reply.
Returns:
A String containing all the info needed to use this module, tailored to the given topic. If the topic is unexpected, the return value should be null.

getModuleName

public String getModuleName()
getModuleName is called to get the name of this module. The name is used when building the list of loaded modules. A module name may contain capital letters.
Specified by:
getModuleName in interface IRCBotModule
Returns:
A String containing the name of this module.