From 70f4f0225cf4357b6fa3c57cd63b49da79b9eeef Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 22 Feb 2021 04:16:24 +0000 Subject: Add snomask permissions to the oper check output. --- src/modules/m_check.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/modules') diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 5434f8054..3291c63e6 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -146,6 +146,15 @@ class CommandCheck : public Command return ret; } + static std::string GetAllowedOperOnlySnomasks(LocalUser* user) + { + std::string ret; + for (unsigned char sno = 'A'; sno <= 'z'; ++sno) + if (ServerInstance->SNO->IsSnomaskUsable(sno) && user->HasSnomaskPermission(sno)) + ret.push_back(sno); + return ret; + } + public: CommandCheck(Module* parent) : Command(parent,"CHECK", 1) @@ -209,6 +218,7 @@ class CommandCheck : public Command { context.Write("chanmodeperms", GetAllowedOperOnlyModes(loctarg, MODETYPE_CHANNEL)); context.Write("usermodeperms", GetAllowedOperOnlyModes(loctarg, MODETYPE_USER)); + context.Write("snomaskperms", GetAllowedOperOnlySnomasks(loctarg)); context.Write("commandperms", oper->AllowedOperCommands.ToString()); context.Write("permissions", oper->AllowedPrivs.ToString()); } -- cgit v1.2.3