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:
1 parent
d9ae3fa7c8
commit
1bacec1dd3
40 files changed
+291
-270
No files matched your search
@@ -63,7 +63,7 @@ public:
|
||||
void OnModCommand(const CString& sCommand) {
|
||||
CString sCmd = sCommand.Token(0);
|
||||
|
||||
if (!m_pUser->IsAdmin()) {
|
||||
if (!GetUser()->IsAdmin()) {
|
||||
PutModule("Access denied");
|
||||
return;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
} else if (sCmd.Equals("block")) {
|
||||
CString sUser = sCommand.Token(1, true);
|
||||
|
||||
if (m_pUser->GetUserName().Equals(sUser)) {
|
||||
if (GetUser()->GetUserName().Equals(sUser)) {
|
||||
PutModule("You can't block yourself");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user