PHP Class Phergie_Plugin_Message, phergie

Inheritance: extends Phergie_Plugin_Abstract
Show file Open project: phergie/phergie

Public Methods

Method Description
getMessage ( ) : string | boolean Allow for prefix and bot name aware extraction of a message
isTargetedMessage ( ) : boolean Check whether a message is specifically targeted at the bot.

Private Methods

Method Description
getSelfRegex ( ) : string Returns a regular expression that matches the bot's nick or aliases.

Method Details

getMessage() public method

Allow for prefix and bot name aware extraction of a message
public getMessage ( ) : string | boolean
return string | boolean $message The message, which is possibly targeted at the bot or false if a prefix requirement failed

isTargetedMessage() public method

This is the case when the message starts with the bot's name followed by [,:>] or when it is a private message.
public isTargetedMessage ( ) : boolean
return boolean true when the message is specifically targeted at the bot, false otherwise.