summaryrefslogtreecommitdiff
path: root/modules/commands/ms_read.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-11-22 00:50:33 -0500
committerAdam <Adam@anope.org>2012-11-22 00:50:33 -0500
commitd33a0f75a5c0c584fbb7cc0076da36d494f39494 (patch)
tree7b2274cc833c793c0f5595660cbd4d715de52ffd /modules/commands/ms_read.cpp
parent368d469631763e9c8bf399980d0ac7c5b5664d39 (diff)
Pretty large coding style cleanup, in source doc
cleanup, and allow protocol mods to depend on each other
Diffstat (limited to 'modules/commands/ms_read.cpp')
-rw-r--r--modules/commands/ms_read.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/commands/ms_read.cpp b/modules/commands/ms_read.cpp
index 5b46ef0dd..6d5adfb05 100644
--- a/modules/commands/ms_read.cpp
+++ b/modules/commands/ms_read.cpp
@@ -17,10 +17,10 @@
static void rsend_notify(CommandSource &source, MemoInfo *mi, Memo *m, const Anope::string &targ)
{
/* Only send receipt if memos are allowed */
- if (memoserv && !readonly)
+ if (MemoServService && !Anope::ReadOnly)
{
/* Get nick alias for sender */
- const NickAlias *na = findnick(m->sender);
+ const NickAlias *na = NickAlias::Find(m->sender);
if (!na)
return;
@@ -33,10 +33,10 @@ static void rsend_notify(CommandSource &source, MemoInfo *mi, Memo *m, const Ano
/* Text of the memo varies if the recepient was a
nick or channel */
- Anope::string text = Anope::printf(translate(na->nc, _("\002[auto-memo]\002 The memo you sent to %s has been viewed.")), targ.c_str());
+ 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 */
- memoserv->Send(source.GetNick(), m->sender, text, true);
+ MemoServService->Send(source.GetNick(), m->sender, text, true);
/* Notify recepient of the memo that a notification has
been sent to the sender */
@@ -58,21 +58,21 @@ class MemoListCallback : public NumberList
{
}
- void HandleNumber(unsigned Number) anope_override
+ void HandleNumber(unsigned number) anope_override
{
- if (!Number || Number > mi->memos->size())
+ if (!number || number > mi->memos->size())
return;
- MemoListCallback::DoRead(source, mi, ci, Number - 1);
+ MemoListCallback::DoRead(source, mi, ci, number - 1);
}
static void DoRead(CommandSource &source, MemoInfo *mi, const ChannelInfo *ci, unsigned index)
{
Memo *m = mi->GetMemo(index);
if (ci)
- source.Reply(_("Memo %d from %s (%s). To delete, type: \002%s%s DEL %s %d\002"), index + 1, m->sender.c_str(), do_strftime(m->time).c_str(), Config->UseStrictPrivMsgString.c_str(), Config->MemoServ.c_str(), ci->name.c_str(), index + 1);
+ source.Reply(_("Memo %d from %s (%s). To delete, type: \002%s%s DEL %s %d\002"), index + 1, m->sender.c_str(), Anope::strftime(m->time).c_str(), Config->UseStrictPrivMsgString.c_str(), Config->MemoServ.c_str(), ci->name.c_str(), index + 1);
else
- source.Reply(_("Memo %d from %s (%s). To delete, type: \002%s%s DEL %d\002"), index + 1, m->sender.c_str(), do_strftime(m->time).c_str(), Config->UseStrictPrivMsgString.c_str(), Config->MemoServ.c_str(), index + 1);
+ source.Reply(_("Memo %d from %s (%s). To delete, type: \002%s%s DEL %d\002"), index + 1, m->sender.c_str(), Anope::strftime(m->time).c_str(), Config->UseStrictPrivMsgString.c_str(), Config->MemoServ.c_str(), index + 1);
source.Reply("%s", m->text.c_str());
m->UnsetFlag(MF_UNREAD);
@@ -103,7 +103,7 @@ class CommandMSRead : public Command
chan = numstr;
numstr = params.size() > 1 ? params[1] : "";
- ci = cs_findchan(chan);
+ ci = ChannelInfo::Find(chan);
if (!ci)
{
source.Reply(CHAN_X_NOT_REGISTERED, chan.c_str());