two more snotes

This commit is contained in:
Eric Mertens 2025-01-28 21:43:44 -08:00
parent 9f49baa6ad
commit b0f254eb13
3 changed files with 13 additions and 0 deletions

View File

@ -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( connection->sig_disconnect.connect(
[&io, &settings, client, bot]() { [&io, &settings, client, bot]() {
client->shutdown(); client->shutdown();

View File

@ -80,6 +80,12 @@ const SnotePattern static patterns[] = {
{SnoteTag::NickCollision, {SnoteTag::NickCollision,
R"(^Nick collision due to services forced nick change on ([^ ]+)$)"}, 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 * static auto setup_database() -> hs_database_t *

View File

@ -31,6 +31,8 @@ enum class SnoteTag
SetVhostOnMarkedAccount, SetVhostOnMarkedAccount,
IsNowOper, IsNowOper,
NickCollision, NickCollision,
OperspyWhois,
Freeze,
}; };
class SnoteMatch class SnoteMatch