summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/memoserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-07 23:46:44 -0500
committerAdam <Adam@anope.org>2013-04-07 23:46:44 -0500
commitfb7fef7a849342ab8463743497e781c5c3e6ae88 (patch)
tree5d230a68b6eed70c7b4f718410dd62fea779654c /modules/pseudoclients/memoserv.cpp
parent36602224b8b1a11326a224779d16bcb12f0ed532 (diff)
Optimizations of much of the more commonly used code
Diffstat (limited to 'modules/pseudoclients/memoserv.cpp')
-rw-r--r--modules/pseudoclients/memoserv.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pseudoclients/memoserv.cpp b/modules/pseudoclients/memoserv.cpp
index 73dd48b94..d28774e34 100644
--- a/modules/pseudoclients/memoserv.cpp
+++ b/modules/pseudoclients/memoserv.cpp
@@ -81,7 +81,7 @@ class MyMemoServService : public MemoServService
{
for (Channel::ChanUserList::iterator it = ci->c->users.begin(), it_end = ci->c->users.end(); it != it_end; ++it)
{
- ChanUserContainer *cu = *it;
+ ChanUserContainer *cu = it->second;
if (ci->AccessFor(cu->user).HasPriv("MEMO"))
{
@@ -171,7 +171,7 @@ class MemoServCore : public Module
void OnJoinChannel(User *u, Channel *c) anope_override
{
- if (c->ci && c->ci->AccessFor(u).HasPriv("MEMO") && c->ci->memos.memos->size() > 0)
+ if (c->ci && !c->ci->memos.memos->empty() && c->ci->AccessFor(u).HasPriv("MEMO"))
{
if (c->ci->memos.memos->size() == 1)
u->SendMessage(MemoServ, _("There is \002%d\002 memo on channel %s."), c->ci->memos.memos->size(), c->ci->name.c_str());