class Crirc::Binding::HookTest
- Crirc::Binding::HookTest
- Reference
- Object
Overview
The HookRules
define a set of rules.
Theses rules can test an event (message) to "match" with.
Defined in:
crirc/binding/hook_test.crConstructors
-
.new(command : Regex | String = "PRIVMSG", source : Regex | String | Nil = nil, arguments : Regex | String | Nil = nil, message : Regex | String | Nil = nil)
- "command" is by default "PRIVMSG", and must be a UPPERCASE irc command (JOIN, PRIVMSG, ...) - "source" is optional.
Instance Method Summary
- #arguments : Regex | String | Nil
- #command : Regex | String
- #message : Regex | String | Nil
- #raw_arguments : Regex | String | Nil
- #source : Regex | String | Nil
- #test(msg : Crirc::Protocol::Message)
Constructor Detail
def self.new(command : Regex | String = "PRIVMSG", source : Regex | String | Nil = nil, arguments : Regex | String | Nil = nil, message : Regex | String | Nil = nil)
#
- "command" is by default "PRIVMSG", and must be a UPPERCASE irc command (JOIN, PRIVMSG, ...)
- "source" is optional. It represents the sender.
- "arguments" is optional. It represents the parameters (without the last argument if prefixed with ":", like in JOIN).
- "message" is optional. It represents the last argument when prefixed with ":".