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
+5 -5
View File
@@ -74,7 +74,7 @@ public:
}
void OnModCommand(const CString& sCommand) {
if (m_pUser->IsAdmin()) {
if (GetUser()->IsAdmin()) {
HandleCommand(sCommand);
} else {
PutModule("Access denied");
@@ -121,10 +121,10 @@ public:
// If the format doesn't contain anything expandable, we'll
// assume this is an "old"-style format string.
if (sData == GetNV("Format")) {
sData.Replace("%", m_pUser->GetIdent());
sData.Replace("%", GetUser()->GetIdent());
}
DEBUG("Writing [" + sData + "] to ident spoof file [" + m_pISpoofLockFile->GetLongName() + "] for user/network [" + m_pUser->GetUserName() + "/" + m_pNetwork->GetName() + "]");
DEBUG("Writing [" + sData + "] to ident spoof file [" + m_pISpoofLockFile->GetLongName() + "] for user/network [" + GetUser()->GetUserName() + "/" + GetNetwork()->GetName() + "]");
m_pISpoofLockFile->Write(sData + "\n");
@@ -180,7 +180,7 @@ public:
}
virtual void OnIRCConnected() {
if (m_pIRCSock == m_pNetwork->GetIRCSock()) {
if (m_pIRCSock == GetNetwork()->GetIRCSock()) {
ReleaseISpoof();
}
}
@@ -192,7 +192,7 @@ public:
}
virtual void OnIRCDisconnected() {
if (m_pIRCSock == m_pNetwork->GetIRCSock()) {
if (m_pIRCSock == GetNetwork()->GetIRCSock()) {
ReleaseISpoof();
}
}