From 74566d869aefab16ede2fa946a0ea7b2cfed51ef Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 17 Sep 2010 14:32:46 -0400 Subject: [PATCH] Fixed bug #1190 and prevent m_dnsbl from akilling a user multiple times if they are in multiple blacklists --- modules/extra/m_dnsbl.cpp | 4 +++- src/regchannel.cpp | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/extra/m_dnsbl.cpp b/modules/extra/m_dnsbl.cpp index ce82b68a4..6360c3753 100644 --- a/modules/extra/m_dnsbl.cpp +++ b/modules/extra/m_dnsbl.cpp @@ -27,9 +27,11 @@ class DNSBLResolver : public DNSRequest void OnLookupComplete(const DNSRecord *) { - if (!user) + if (!user || user->GetExt("m_dnsbl_akilled")) return; + user->Extend("m_dnsbl_akilled"); + Anope::string reason = this->blacklist.reason; reason = reason.replace_all_ci("%i", user->ip.addr()); reason = reason.replace_all_ci("%h", user->host); diff --git a/src/regchannel.cpp b/src/regchannel.cpp index fb8036677..ad9a0eac7 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -394,9 +394,10 @@ void ChannelInfo::LoadMLock() if (this->HasFlag(CI_PERSIST) && !this->c) { this->c = new Channel(this->name, this->time_registered); - if (!this->bi) + if (!this->bi && ModeManager::FindChannelModeByName(CMODE_PERM) == NULL) ChanServ->Assign(NULL, this); - this->bi->Join(c); + else if (this->bi) + this->bi->Join(c); check_modes(this->c); this->CheckTopic(); }