Allow disabling the use of adding networks for non admins

Closes #122
This commit is contained in:
Kyle Fuller
2012-02-15 16:05:57 +00:00
parent b9ff3ddcb1
commit 8863d853c9
5 changed files with 36 additions and 0 deletions

View File

@@ -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;