diff --git a/main.cpp b/main.cpp index 76346de..aeb6bba 100644 --- a/main.cpp +++ b/main.cpp @@ -106,6 +106,11 @@ static auto start(boost::asio::io_context &io, const Settings &settings) -> void } }); + client->sig_chat.connect([client, connection](const Chat &chat){ + if (chat.source.starts_with("glguy!") && client->is_my_nick(chat.target)) { + connection->send_notice("glguy", chat.message); + }}); + connection->sig_disconnect.connect( [&io, &settings, client, bot]() { client->shutdown(); diff --git a/snote.cpp b/snote.cpp index 85e6ee9..5b78b6b 100644 --- a/snote.cpp +++ b/snote.cpp @@ -80,6 +80,12 @@ const SnotePattern static patterns[] = { {SnoteTag::NickCollision, R"(^Nick collision due to services forced nick change on ([^ ]+)$)"}, + + {SnoteTag::OperspyWhois, + R"(^OPERSPY ([^ ]+)!([^ ]+)@([^ ]+)\{([^ ]+)\} WHOIS ([^ ]+)!([^ ]+)@([^ ]+) ([^ ]+)$)"}, + + {SnoteTag::Freeze, + R"(^([^ ]+) froze the account ([^ ]+) \((.*)\)\.$)"}, }; static auto setup_database() -> hs_database_t * diff --git a/snote.hpp b/snote.hpp index 2e8ead3..7f68e92 100644 --- a/snote.hpp +++ b/snote.hpp @@ -31,6 +31,8 @@ enum class SnoteTag SetVhostOnMarkedAccount, IsNowOper, NickCollision, + OperspyWhois, + Freeze, }; class SnoteMatch