Skip to content

Commit

Permalink
remove pModule from Ismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
gtmanfred committed Nov 23, 2012
1 parent 77e4ae5 commit f941ee5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/autoattach.cpp
Expand Up @@ -30,7 +30,7 @@ class CAttachMatch {
m_sHostmaskWildcard = "*!*@*"; m_sHostmaskWildcard = "*!*@*";
} }


bool IsMatch(const CString& sChan, const CString& sHost, const CString& sMessage, const CModule *pModule) const { bool IsMatch(const CString& sChan, const CString& sHost, const CString& sMessage) const {
if (!sHost.WildCmp(m_sHostmaskWildcard)) if (!sHost.WildCmp(m_sHostmaskWildcard))
return false; return false;
if (!sChan.WildCmp(m_sChannelWildcard)) if (!sChan.WildCmp(m_sChannelWildcard))
Expand Down Expand Up @@ -190,21 +190,20 @@ class CChanAttach : public CModule {
const CString& sChan = Channel.GetName(); const CString& sChan = Channel.GetName();
const CString& sHost = Nick.GetHostMask(); const CString& sHost = Nick.GetHostMask();
const CString& sMessage = Message; const CString& sMessage = Message;
const CModule* pModule = this;
VAttachIter it; VAttachIter it;


if (!Channel.IsDetached()) if (!Channel.IsDetached())
return; return;


// Any negated match? // Any negated match?
for (it = m_vMatches.begin(); it != m_vMatches.end(); ++it) { for (it = m_vMatches.begin(); it != m_vMatches.end(); ++it) {
if (it->IsNegated() && it->IsMatch(sChan, sHost, sMessage, pModule)) if (it->IsNegated() && it->IsMatch(sChan, sHost, sMessage))
return; return;
} }


// Now check for a positive match // Now check for a positive match
for (it = m_vMatches.begin(); it != m_vMatches.end(); ++it) { for (it = m_vMatches.begin(); it != m_vMatches.end(); ++it) {
if (!it->IsNegated() && it->IsMatch(sChan, sHost, sMessage, pModule)) { if (!it->IsNegated() && it->IsMatch(sChan, sHost, sMessage)) {
Channel.JoinUser(); Channel.JoinUser();
return; return;
} }
Expand Down

0 comments on commit f941ee5

Please sign in to comment.