#include "snote_thread.hpp" #include "irc_parse_thread.hpp" #include "connection.hpp" #include auto snote_thread(Connection * connection) -> void { static char const* const prefix = "*** Notice -- "; connection->add_listener([connection](IrcMsgEvent& event) { auto& irc = event.irc; if ("NOTICE" == irc.command && 2 == irc.args.size() && "*" == irc.args[0] && irc.args[1].starts_with(prefix)) { event.handled_ = true; connection->make_event(irc.args[1].substr(strlen(prefix))); } }); }