summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-01 14:40:17 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-01 14:40:17 +0000
commit6e6846b68a28d858275702e6662e79328e62c60e (patch)
tree473d335e0346896dd539becdb24e8de3cab248a8 /src/users.cpp
parent6d715e128f9cea6c25cc57dc23c1bccdbbfda475 (diff)
Fix some valgrind warnings
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11790 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 236df2d65..93e7e89a6 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1298,19 +1298,18 @@ void User::WriteCommonQuit(const std::string &normal_text, const std::string &op
snprintf(tb2,MAXBUF,":%s QUIT :%s",this->GetFullHost().c_str(),oper_text.c_str());
std::string out1 = tb1;
std::string out2 = tb2;
+ already_sent[this->fd] = uniq_id;
for (UCListIter v = this->chans.begin(); v != this->chans.end(); v++)
{
const UserMembList* ulist = (*v)->GetUsers();
for (UserMembList::const_iterator i = ulist->begin(); i != ulist->end(); i++)
{
- if (this != i->first)
+ User* u = i->first;
+ if (IS_LOCAL(u) && !u->quitting && (already_sent[u->fd] != uniq_id))
{
- if ((IS_LOCAL(i->first)) && (already_sent[i->first->fd] != uniq_id))
- {
- already_sent[i->first->fd] = uniq_id;
- i->first->Write(IS_OPER(i->first) ? out2 : out1);
- }
+ already_sent[u->fd] = uniq_id;
+ u->Write(IS_OPER(u) ? out2 : out1);
}
}
}