diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-03-23 04:54:30 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-03-23 04:54:30 +0000 |
commit | 190a3de3b910397250f7a31b0a5f9e6589aedb78 (patch) | |
tree | 827a0ff72248fcf310698888650722ce15635fc3 /src | |
parent | ce09914e1d767e88f6f5d72ac622d1321c91f9ee (diff) |
Fix bug #1044, CS SET MLOCK no longer requires a parameter, and leaving out the parameter renders the mlock to +r as it should be.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2195 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/core/cs_set.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/cs_set.c b/src/core/cs_set.c index 63a2bfb36..dbe89f07a 100644 --- a/src/core/cs_set.c +++ b/src/core/cs_set.c @@ -213,7 +213,7 @@ class CommandCSSet : public Command ci->mlock_redirect = NULL; } - std::string params(modes), param; + std::string params(modes ? modes : ""), param; unsigned space = params.find(' '); if (space != std::string::npos) { @@ -223,7 +223,7 @@ class CommandCSSet : public Command } spacesepstream modeparams(param); - while ((mode = *modes++)) { + while (modes && (mode = *modes++)) { switch (mode) { case '+': add = 1; @@ -569,7 +569,8 @@ class CommandCSSet : public Command if (!param && (!cmd || (stricmp(cmd, "SUCCESSOR") != 0 && stricmp(cmd, "URL") != 0 && stricmp(cmd, "EMAIL") != 0 && - stricmp(cmd, "ENTRYMSG") != 0))) { + stricmp(cmd, "ENTRYMSG") != 0) && + stricmp(cmd, "MLOCK") != 0)) { syntax_error(s_ChanServ, u, "SET", CHAN_SET_SYNTAX); } else if (!(ci = cs_findchan(chan))) { notice_lang(s_ChanServ, u, CHAN_X_NOT_REGISTERED, chan); |