From 7ed7c7ba0dfd3f73a7d8a621988d7e99f07a23ef Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 12 Mar 2026 15:15:38 +0000 Subject: Move to and rework. - The default prefix modes are now separate from the default channel modes. This should result in less accidentally broken configs. - The privs are now pre-parsed to a list of mode references. This should improve performance slightly as the repeated mode lookups are gone. It also allows us to write warnings to the debug log when the default privs are invalid. - Channels can now have a default topic. --- modules/ojoin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/ojoin.cpp') diff --git a/modules/ojoin.cpp b/modules/ojoin.cpp index 2c2e163b6..8c6abced3 100644 --- a/modules/ojoin.cpp +++ b/modules/ojoin.cpp @@ -120,13 +120,13 @@ public: { } - ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven, bool override) override + ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, PrefixMode::Set& privs, const std::string& keygiven, bool override) override { if (mycommand.active) { - privs += np.GetModeChar(); - if (mycommand.op && mycommand.opmode) - privs += mycommand.opmode->IsPrefixMode()->GetPrefix(); + privs.insert(&np); + if (mycommand.op && mycommand.opmode && mycommand.opmode->IsPrefixMode()) + privs.insert(mycommand.opmode->IsPrefixMode()); return MOD_RES_ALLOW; } -- cgit v1.3.1-10-gc9f91