irccd
3.0.3
|
Server which prints everything in the console. More...
#include <debug_server.hpp>
Public Member Functions | |
void | connect (connect_handler handler) noexcept override |
void | disconnect () noexcept override |
void | invite (std::string_view target, std::string_view channel) override |
void | join (std::string_view channel, std::string_view password="") override |
void | kick (std::string_view target, std::string_view channel, std::string_view reason="") override |
void | me (std::string_view target, std::string_view message) override |
void | message (std::string_view target, std::string_view message) override |
void | mode (std::string_view channel, std::string_view mode, std::string_view limit="", std::string_view user="", std::string_view mask="") override |
void | names (std::string_view channel) override |
void | notice (std::string_view target, std::string_view message) override |
void | part (std::string_view channel, std::string_view reason="") override |
void | send (std::string_view raw) override |
void | topic (std::string_view channel, std::string_view topic) override |
void | whois (std::string_view target) override |
![]() | |
server (boost::asio::io_service &service, std::string id, std::string hostname="localhost") | |
virtual | ~server () |
auto | get_state () const noexcept -> state |
auto | get_id () const noexcept -> const std::string & |
auto | get_hostname () const noexcept -> const std::string & |
auto | get_password () const noexcept -> const std::string & |
void | set_password (std::string password) noexcept |
auto | get_port () const noexcept -> std::uint16_t |
void | set_port (std::uint16_t port) noexcept |
auto | get_options () const noexcept -> options |
void | set_options (options flags) noexcept |
auto | get_nickname () const noexcept -> const std::string & |
void | set_nickname (std::string nickname) |
auto | get_username () const noexcept -> const std::string & |
void | set_username (std::string name) noexcept |
auto | get_realname () const noexcept -> const std::string & |
void | set_realname (std::string realname) noexcept |
auto | get_ctcp_version () const noexcept -> const std::string & |
void | set_ctcp_version (std::string ctcpversion) |
auto | get_command_char () const noexcept -> const std::string & |
void | set_command_char (std::string command_char) noexcept |
auto | get_reconnect_delay () const noexcept -> std::uint16_t |
void | set_reconnect_delay (std::uint16_t reconnect_delay) noexcept |
auto | get_ping_timeout () const noexcept -> std::uint16_t |
void | set_ping_timeout (std::uint16_t ping_timeout) noexcept |
auto | get_channels () const noexcept -> const std::set< std::string > & |
auto | is_self (std::string_view nick) const noexcept -> bool |
virtual void | wait (connect_handler handler) |
virtual void | recv (recv_handler handler) noexcept |
Additional Inherited Members | |
![]() | |
enum class | options : std::uint8_t { none = 0 , ipv4 = (1 << 0) , ipv6 = (1 << 1) , ssl = (1 << 2) , auto_rejoin = (1 << 3) , auto_reconnect = (1 << 4) , join_invite = (1 << 5) } |
Various options for server. More... | |
enum class | state : std::uint8_t { disconnected , connecting , identifying , connected } |
Describe current server state. More... | |
using | connect_handler = std::function< void(std::error_code)> |
using | recv_handler = std::function< void(std::error_code, event)> |
![]() | |
state | state_ {state::disconnected} |
Server state. More... | |
Server which prints everything in the console.
|
overridevirtualnoexcept |
Start connecting.
This only initiate TCP connection and/or SSL handshaking, the identifying process may take some time and you must repeatedly call recv() to wait for connect_event.
handler | the completion handler |
Reimplemented from irccd::daemon::server.
|
overridevirtualnoexcept |
Force disconnection.
Reimplemented from irccd::daemon::server.
|
overridevirtual |
Invite a user to a channel.
target | the target nickname |
channel | the channel |
Reimplemented from irccd::daemon::server.
|
overridevirtual |
Join a channel, the password is optional and can be kept empty.
channel | the channel to join |
password | the optional password |
Reimplemented from irccd::daemon::server.
|
overridevirtual |
Kick someone from the channel. Please be sure to have the rights on that channel because errors won't be reported.
target | the target to kick |
channel | from which channel |
reason | the optional reason |
Reimplemented from irccd::daemon::server.
|
overridevirtual |
Send a CTCP Action as known as /me. The target may be either a channel or a nickname.
target | the nickname or the channel |
message | the message |
Reimplemented from irccd::daemon::server.
|
overridevirtual |
Send a message to the specified target or channel.
target | the target |
message | the message |
Reimplemented from irccd::daemon::server.
|
overridevirtual |
Change channel/user mode.
channel | the channel or nickname |
mode | the mode |
limit | the optional limit |
user | the optional user |
mask | the optional ban mask |
Reimplemented from irccd::daemon::server.
|
overridevirtual |
|
overridevirtual |
Send a private notice.
target | the target |
message | the notice message |
Reimplemented from irccd::daemon::server.
|
overridevirtual |
Part from a channel.
Please note that the reason is not supported on all servers so if you want portability, don't provide it.
channel | the channel to leave |
reason | the optional reason |
Reimplemented from irccd::daemon::server.
|
overridevirtual |
Send a raw message to the IRC server. You don't need to add message terminators.
If the server is not yet connected, the command is postponed and will be ran when ready.
raw | the raw message (without \r\n\r\n ) |
Reimplemented from irccd::daemon::server.
|
overridevirtual |
Change the channel topic.
channel | the channel |
topic | the desired topic |
Reimplemented from irccd::daemon::server.
|
overridevirtual |
Request for whois information.
target | the target nickname |
Reimplemented from irccd::daemon::server.