Modules: use public API

Avoid accessing protected member variables directly, so
there's a chance of cleaning up the module API later.
This commit is contained in:
J-P Nurmi
2014-10-06 19:18:31 +02:00
parent d9ae3fa7c8
commit 1bacec1dd3
40 changed files with 291 additions and 270 deletions

View File

@@ -218,7 +218,7 @@ public:
}
virtual void OnOp2(const CNick* pOpNick, const CNick& Nick, CChan& Channel, bool bNoChange) {
if (Nick.GetNick() == m_pNetwork->GetIRCNick().GetNick()) {
if (Nick.GetNick() == GetNetwork()->GetIRCNick().GetNick()) {
const map<CString,CNick>& msNicks = Channel.GetNicks();
for (map<CString,CNick>::const_iterator it = msNicks.begin(); it != msNicks.end(); ++it) {
@@ -420,7 +420,7 @@ public:
// First verify that the person who challenged us matches a user's host
if (pUser->HostMatches(Nick.GetHostMask())) {
const vector<CChan*>& Chans = m_pNetwork->GetChans();
const vector<CChan*>& Chans = GetNetwork()->GetChans();
bMatchedHost = true;
// Also verify that they are opped in at least one of the user's chans
@@ -515,7 +515,7 @@ public:
}
void OpUser(const CNick& Nick, const CAutoOpUser& User) {
const vector<CChan*>& Chans = m_pNetwork->GetChans();
const vector<CChan*>& Chans = GetNetwork()->GetChans();
for (size_t a = 0; a < Chans.size(); a++) {
const CChan& Chan = *Chans[a];