From da43e02228dfddc921946a94ae3790a35559b1d5 Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Mon, 23 Mar 2009 18:30:30 +0000 Subject: Partial fix for NS REGISTER not displaying syntax error if only 1 argument is given, not completely fixed due to how OnSyntaxError is called, problem spotted by DukePyrolator, thanks! git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2200 5417fbe8-f217-4b02-8779-1006273d7864 --- src/modules/ns_maxemail.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/ns_maxemail.c b/src/modules/ns_maxemail.c index 2724733d0..3a7310433 100644 --- a/src/modules/ns_maxemail.c +++ b/src/modules/ns_maxemail.c @@ -34,14 +34,14 @@ static Module *me; class CommandNSRegister : public Command { public: - CommandNSRegister() : Command("REGISTER", 2, 2) + CommandNSRegister() : Command("REGISTER", 1, 2) { this->SetFlag(CFLAG_ALLOW_UNREGISTERED); } CommandReturn Execute(User *u, std::vector ¶ms) { - return check_email_limit_reached(params[1].c_str(), u); + return check_email_limit_reached(params.size() > 1 ? params[1].c_str() : NULL, u); } void OnSyntaxError(User *u) -- cgit