#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& args = event.irc.args; if (IrcCommand::NOTICE == event.command && "*" == args[0] && args[1].starts_with(prefix)) { event.handled_ = true; connection.make_event(args[1].substr(strlen(prefix))); } }); }