From 3bba87b655a5c7d5f5721a5a7fc018f30f1390f2 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 16 Feb 2025 12:12:38 +0000 Subject: Make the password optional in operserv/login. --- modules/operserv/os_login.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/operserv/os_login.cpp b/modules/operserv/os_login.cpp index 184d643d6..9cf62e947 100644 --- a/modules/operserv/os_login.cpp +++ b/modules/operserv/os_login.cpp @@ -15,7 +15,7 @@ class CommandOSLogin final : public Command { public: - CommandOSLogin(Module *creator) : Command(creator, "operserv/login", 1, 1) + CommandOSLogin(Module *creator) : Command(creator, "operserv/login", 0, 1) { this->SetSyntax(_("\037password\037")); this->RequireUser(true); @@ -23,8 +23,6 @@ public: void Execute(CommandSource &source, const std::vector ¶ms) override { - const Anope::string &password = params[0]; - User *u = source.GetUser(); Oper *o = source.nc->o; if (o == NULL) @@ -33,7 +31,7 @@ public: source.Reply(_("Your oper block doesn't require logging in.")); else if (u->HasExt("os_login")) source.Reply(_("You are already identified.")); - else if (o->password != password) + else if (params.empty() || o->password != params[0]) { source.Reply(PASSWORD_INCORRECT); u->BadPassword(); -- cgit