diff options
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); |