mirror of
https://github.com/znc/znc.git
synced 2026-08-11 19:32:46 +02:00
@@ -571,6 +571,13 @@ class CAdminMod : public CModule {
|
||||
}
|
||||
|
||||
void AddNetwork(const CString& sLine) {
|
||||
#ifndef ENABLE_ADD_NETWORK
|
||||
if (!m_pUser->IsAdmin()) {
|
||||
PutModule("Permission denied");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
CString sUser = sLine.Token(1);
|
||||
CString sNetwork = sLine.Token(2);
|
||||
CUser *pUser = m_pUser;
|
||||
|
||||
@@ -700,6 +700,13 @@ public:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
#ifndef ENABLE_ADD_NETWORK
|
||||
if (!spSession->IsAdmin()) {
|
||||
WebSock.PrintErrorPage("Permission denied");
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
Tmpl["Action"] = "addnetwork";
|
||||
Tmpl["Title"] = "Add Network for User [" + pUser->GetUserName() + "]";
|
||||
Tmpl["IRCConnectEnabled"] = "true";
|
||||
|
||||
Reference in New Issue
Block a user