Describe a IRC message.
More...
#include <irc.hpp>
|
template<typename Enum > |
auto | is (Enum e) const noexcept -> bool |
|
auto | get (unsigned short index) const noexcept -> const std::string & |
|
auto | is_ctcp (unsigned short index) const noexcept -> bool |
|
auto | ctcp (unsigned short index) const -> std::string |
|
◆ ctcp()
auto irccd::daemon::irc::message::ctcp |
( |
unsigned short |
index | ) |
const -> std::string |
Parse a CTCP message.
- Precondition
- is_ctcp(index)
- Parameters
-
- Returns
- the CTCP command
◆ get()
auto irccd::daemon::irc::message::get |
( |
unsigned short |
index | ) |
const -> const std::string & |
|
noexcept |
Convenient function that returns an empty string if the nth argument is not defined.
- Parameters
-
- Returns
- a string or empty if out of bounds
◆ is()
template<typename Enum >
auto irccd::daemon::irc::message::is |
( |
Enum |
e | ) |
const -> bool
|
|
inlinenoexcept |
Check if the command is of the given enum number.
- Parameters
-
- Returns
- true if command is a number and equals to e
◆ is_ctcp()
auto irccd::daemon::irc::message::is_ctcp |
( |
unsigned short |
index | ) |
const -> bool |
|
noexcept |
Tells if the message is a CTCP.
- Parameters
-
index | the param index (maybe out of bounds) |
- Returns
- true if CTCP
◆ parse()
static auto irccd::daemon::irc::message::parse |
( |
const std::string & |
line | ) |
-> message |
|
static |
Parse a IRC message.
- Parameters
-
line | the buffer content (without \r\n ) |
- Returns
- the message (maybe empty if line is empty)
◆ args
std::vector<std::string> irccd::daemon::irc::message::args |
◆ command
std::string irccd::daemon::irc::message::command |
command (maybe string or code)
◆ prefix
std::string irccd::daemon::irc::message::prefix |
The documentation for this struct was generated from the following file: