C# Class Helpmebot.Legacy.LegacyCommandParser

A command parser
ファイルを表示 Open project: helpmebot/helpmebot Class Usage Examples

Public Methods

Method Description
FindRedirection ( string &args ) : string

Finds the redirection.

HandleCommand ( Helpmebot.Legacy.Model.LegacyUser source, string destination, string command, string args ) : void

Handles the command.

IsRecognisedMessage ( string &message, bool &overrideSilence, IIrcClient client ) : bool

Tests against recognised message formats

Allowed formats: !command !helpmebot command Helpmebot: command Helpmebot command Helpmebot, command Helpmebot> command

LegacyCommandParser ( ICommandServiceHelper commandServiceHelper, ILogger logger ) : System

Initialises a new instance of the LegacyCommandParser class.

Private Methods

Method Description
HandleCommandResponseHandler ( Helpmebot.Legacy.Model.LegacyUser source, string destination, string directedTo, CommandResponseHandler response ) : void

Handles the command response handler.

ParseRawLineForMessage ( string &message, string nickname, string trigger ) : bool

The parse raw line for message.

Method Details

FindRedirection() public static method

Finds the redirection.
public static FindRedirection ( string &args ) : string
args string /// The args. ///
return string

HandleCommand() public method

Handles the command.
public HandleCommand ( Helpmebot.Legacy.Model.LegacyUser source, string destination, string command, string args ) : void
source Helpmebot.Legacy.Model.LegacyUser /// The source. ///
destination string /// The destination. ///
command string /// The command. ///
args string /// The args. ///
return void

IsRecognisedMessage() public method

Tests against recognised message formats
Allowed formats: !command !helpmebot command Helpmebot: command Helpmebot command Helpmebot, command Helpmebot> command
public IsRecognisedMessage ( string &message, bool &overrideSilence, IIrcClient client ) : bool
message string /// the message received ///
overrideSilence bool /// ref: whether this message format overrides any imposed silence ///
client IIrcClient /// The client. ///
return bool

LegacyCommandParser() public method

Initialises a new instance of the LegacyCommandParser class.
public LegacyCommandParser ( ICommandServiceHelper commandServiceHelper, ILogger logger ) : System
commandServiceHelper ICommandServiceHelper /// The command Service Helper. ///
logger ILogger /// The logger. ///
return System