diff options
| author | Sadie Powell <sadie@witchery.services> | 2025-02-16 12:12:38 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2025-02-16 12:12:38 +0000 |
| commit | 3bba87b655a5c7d5f5721a5a7fc018f30f1390f2 (patch) | |
| tree | 307228f83613ddc247512c40ca454fc38bbaef72 /modules | |
| parent | 515dc96d6c5ce537fd2012bb345905af5168ba8c (diff) | |
Make the password optional in operserv/login.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/operserv/os_login.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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<Anope::string> ¶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(); |
