summaryrefslogtreecommitdiff
path: root/modules/commands/ms_read.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-04-20 14:35:14 -0400
committerAdam <Adam@anope.org>2014-04-20 14:35:14 -0400
commit26ac315192e0d8a04d50e910697ab794eedf0cc1 (patch)
treeb9916f14fe35ce5c4de95c4194ca4ea0cb30812f /modules/commands/ms_read.cpp
parent0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff)
New event system
Diffstat (limited to 'modules/commands/ms_read.cpp')
-rw-r--r--modules/commands/ms_read.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/commands/ms_read.cpp b/modules/commands/ms_read.cpp
index 9cc0be881..ba5eda863 100644
--- a/modules/commands/ms_read.cpp
+++ b/modules/commands/ms_read.cpp
@@ -10,13 +10,12 @@
*/
#include "module.h"
-
-static ServiceReference<MemoServService> MemoServService("MemoServService", "MemoServ");
+#include "modules/memoserv.h"
static void rsend_notify(CommandSource &source, MemoInfo *mi, Memo *m, const Anope::string &targ)
{
/* Only send receipt if memos are allowed */
- if (MemoServService && !Anope::ReadOnly)
+ if (MemoServ::service && !Anope::ReadOnly)
{
/* Get nick alias for sender */
const NickAlias *na = NickAlias::Find(m->sender);
@@ -35,7 +34,7 @@ static void rsend_notify(CommandSource &source, MemoInfo *mi, Memo *m, const Ano
Anope::string text = Anope::printf(Language::Translate(na->nc, _("\002[auto-memo]\002 The memo you sent to %s has been viewed.")), targ.c_str());
/* Send notification */
- MemoServService->Send(source.GetNick(), m->sender, text, true);
+ MemoServ::service->Send(source.GetNick(), m->sender, text, true);
/* Notify recepient of the memo that a notification has
been sent to the sender */
@@ -197,8 +196,8 @@ class MSRead : public Module
CommandMSRead commandmsread;
public:
- MSRead(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
- commandmsread(this)
+ MSRead(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR)
+ , commandmsread(this)
{
}