From 1a3d9a016d3adc49788bbff73aac9b3b5ea85b17 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 1 Jul 2013 22:17:52 -0400 Subject: Change extensible keys to require explicitly having a type defined for it. Completely modularize more features like bs_kick, entrymsg, log, mode, etc. Move fantasy to its own module. Move greet to its own module. --- modules/commands/ms_set.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'modules/commands/ms_set.cpp') diff --git a/modules/commands/ms_set.cpp b/modules/commands/ms_set.cpp index 9bf63b15d..e6d48d08a 100644 --- a/modules/commands/ms_set.cpp +++ b/modules/commands/ms_set.cpp @@ -25,27 +25,27 @@ class CommandMSSet : public Command if (param.equals_ci("ON")) { - nc->ExtendMetadata("MEMO_SIGNON"); - nc->ExtendMetadata("MEMO_RECEIVE"); + nc->Extend("MEMO_SIGNON"); + nc->Extend("MEMO_RECEIVE"); source.Reply(_("%s will now notify you of memos when you log on and when they are sent to you."), MemoServ->nick.c_str()); } else if (param.equals_ci("LOGON")) { - nc->ExtendMetadata("MEMO_SIGNON"); - nc->Shrink("MEMO_RECEIVE"); + nc->Extend("MEMO_SIGNON"); + nc->Shrink("MEMO_RECEIVE"); source.Reply(_("%s will now notify you of memos when you log on or unset /AWAY."), MemoServ->nick.c_str()); } else if (param.equals_ci("NEW")) { - nc->Shrink("MEMO_SIGNON"); - nc->ExtendMetadata("MEMO_RECEIVE"); + nc->Shrink("MEMO_SIGNON"); + nc->Extend("MEMO_RECEIVE"); source.Reply(_("%s will now notify you of memos when they are sent to you."), MemoServ->nick.c_str()); } else if (param.equals_ci("MAIL")) { if (!nc->email.empty()) { - nc->ExtendMetadata("MEMO_MAIL"); + nc->Extend("MEMO_MAIL"); source.Reply(_("You will now be informed about new memos via email.")); } else @@ -53,20 +53,18 @@ class CommandMSSet : public Command } else if (param.equals_ci("NOMAIL")) { - nc->Shrink("MEMO_MAIL"); + nc->Shrink("MEMO_MAIL"); source.Reply(_("You will no longer be informed via email.")); } else if (param.equals_ci("OFF")) { - nc->Shrink("MEMO_SIGNON"); - nc->Shrink("MEMO_RECEIVE"); - nc->Shrink("MEMO_MAIL"); + nc->Shrink("MEMO_SIGNON"); + nc->Shrink("MEMO_RECEIVE"); + nc->Shrink("MEMO_MAIL"); source.Reply(_("%s will not send you any notification of memos."), MemoServ->nick.c_str()); } else this->OnSyntaxError(source, ""); - - return; } void DoLimit(CommandSource &source, const std::vector ¶ms, MemoInfo *mi) @@ -125,16 +123,16 @@ class CommandMSSet : public Command if (!chan.empty()) { if (!p2.empty()) - ci->ExtendMetadata("MEMO_HARDMAX"); + ci->Extend("MEMO_HARDMAX"); else - ci->Shrink("MEMO_HARDMAX"); + ci->Shrink("MEMO_HARDMAX"); } else { if (!p2.empty()) - nc->ExtendMetadata("MEMO_HARDMAX"); + nc->Extend("MEMO_HARDMAX"); else - nc->Shrink("MEMO_HARDMAX"); + nc->Shrink("MEMO_HARDMAX"); } limit = -1; try @@ -301,10 +299,12 @@ class CommandMSSet : public Command class MSSet : public Module { CommandMSSet commandmsset; + PrimitiveExtensibleItem memo_signon, memo_receive, memo_mail, memo_hardmax; public: MSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), - commandmsset(this) + commandmsset(this), memo_signon(this, "MEMO_SIGNON"), memo_receive(this, "MEMO_RECEIVE"), memo_mail(this, "MEMO_MAIL"), + memo_hardmax(this, "MEMO_HARDMAX") { } -- cgit