diff options
author | Adam <Adam@anope.org> | 2016-10-22 16:43:18 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2016-10-22 16:52:29 -0400 |
commit | fce6169f4e134a99dbb19997337b1bb250889147 (patch) | |
tree | b6f2f6c1bc7094a32b5dc6bb1df97fc4b675e9e0 /modules/memoserv/set.cpp | |
parent | 06f40cabcb167e2764c03092f6ec3f7383983f95 (diff) |
Various codestyle cleanup in most of the core modules
Diffstat (limited to 'modules/memoserv/set.cpp')
-rw-r--r-- | modules/memoserv/set.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/memoserv/set.cpp b/modules/memoserv/set.cpp index acb575084..13d24bd98 100644 --- a/modules/memoserv/set.cpp +++ b/modules/memoserv/set.cpp @@ -57,7 +57,9 @@ class CommandMSSet : public Command source.Reply(_("You will now be informed about new memos via email.")); } else + { source.Reply(_("There's no email address set for your nick.")); + } } else if (param.equals_ci("NOMAIL")) { @@ -72,7 +74,9 @@ class CommandMSSet : public Command source.Reply(_("\002{0}\002 will not send you any notification of memos."), MemoServ->nick); } else + { this->OnSyntaxError(source, ""); + } } void DoLimit(CommandSource &source, const std::vector<Anope::string> ¶ms, MemoServ::MemoInfo *mi) @@ -106,8 +110,10 @@ class CommandMSSet : public Command source.Reply(_("Access denied. You do not have privilege \002{0}\002 on \002{1}\002."), "MEMO", ci->GetName()); return; } + mi = ci->GetMemos(); } + if (is_servadmin) { if (!p2.empty() && !p2.equals_ci("HARD") && chan.empty()) @@ -185,7 +191,9 @@ class CommandMSSet : public Command return; } } + mi->SetMemoMax(limit); + if (limit > 0) { if (chan.empty() && nc == source.nc) @@ -248,6 +256,7 @@ class CommandMSSet : public Command Config->StrictPrivmsg, source.service->nick, help->cname, source.command); } else if (subcommand.equals_ci("NOTIFY")) + { source.Reply(_("Syntax: \002NOTIFY {ON | LOGON | NEW | MAIL | NOMAIL | OFF}\002\n" "\n" "Changes when you will be notified about new memos:\n" @@ -270,6 +279,7 @@ class CommandMSSet : public Command " OFF You will not receive any notification of memos.\n" "\n" "\002ON\002 is essentially \002LOGON\002 and \002NEW\002 combined.")); + } else if (subcommand.equals_ci("LIMIT")) { int max_memos = Config->GetModule("memoserv/main")->Get<int>("maxmemos"); @@ -294,7 +304,9 @@ class CommandMSSet : public Command "However, you cannot set this any higher than {0}."), max_memos); } else + { return false; + } return true; } |