summaryrefslogtreecommitdiff
path: root/src/modules/ns_maxemail.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-23 18:30:30 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-03-23 18:30:30 +0000
commitda43e02228dfddc921946a94ae3790a35559b1d5 (patch)
tree91cf69c48d79e8e1641476986ad10e910a755cc7 /src/modules/ns_maxemail.c
parentca28b7c1b354419790cd3d5e8f3882b87deff965 (diff)
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
Diffstat (limited to 'src/modules/ns_maxemail.c')
-rw-r--r--src/modules/ns_maxemail.c4
1 files changed, 2 insertions, 2 deletions
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<std::string> &params)
{
- 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)