mirror of
https://github.com/znc/znc.git
synced 2026-08-09 10:23:14 +02:00
Merge branch 'master' of github.com:znc/znc
This commit is contained in:
@@ -127,6 +127,7 @@ public:
|
||||
const SCString& GetTrustedFingerprints() const { return m_ssTrustedFingerprints; }
|
||||
void AddTrustedFingerprint(const CString& sFP) { m_ssTrustedFingerprints.insert(sFP.Escape_n(CString::EHEXCOLON, CString::EHEXCOLON)); }
|
||||
void DelTrustedFingerprint(const CString& sFP) { m_ssTrustedFingerprints.erase(sFP); }
|
||||
void ClearTrustedFingerprints() { m_ssTrustedFingerprints.clear(); }
|
||||
|
||||
void SetIRCConnectEnabled(bool b);
|
||||
bool GetIRCConnectEnabled() const { return m_bIRCConnectEnabled; }
|
||||
|
||||
@@ -63,6 +63,8 @@ public:
|
||||
CConfig ToConfig() const;
|
||||
bool CheckPass(const CString& sPass) const;
|
||||
bool AddAllowedHost(const CString& sHostMask);
|
||||
bool RemAllowedHost(const CString& sHostMask);
|
||||
void ClearAllowedHosts();
|
||||
bool IsHostAllowed(const CString& sHostMask) const;
|
||||
bool IsValid(CString& sErrMsg, bool bSkipPass = false) const;
|
||||
static bool IsValidUserName(const CString& sUserName);
|
||||
|
||||
@@ -1049,9 +1049,7 @@ public:
|
||||
}
|
||||
|
||||
WebSock.GetRawParam("fingerprints").Split("\n", vsArgs);
|
||||
while (!pNetwork->GetTrustedFingerprints().empty()) {
|
||||
pNetwork->DelTrustedFingerprint(*pNetwork->GetTrustedFingerprints().begin());
|
||||
}
|
||||
pNetwork->ClearTrustedFingerprints();
|
||||
for (const CString& sFP : vsArgs) {
|
||||
pNetwork->AddTrustedFingerprint(sFP);
|
||||
}
|
||||
|
||||
@@ -791,6 +791,12 @@ bool CUser::AddAllowedHost(const CString& sHostMask) {
|
||||
m_ssAllowedHosts.insert(sHostMask);
|
||||
return true;
|
||||
}
|
||||
bool CUser::RemAllowedHost(const CString& sHostMask) {
|
||||
return m_ssAllowedHosts.erase(sHostMask) > 0;
|
||||
}
|
||||
void CUser::ClearAllowedHosts() {
|
||||
m_ssAllowedHosts.clear();
|
||||
}
|
||||
|
||||
bool CUser::IsHostAllowed(const CString& sHostMask) const {
|
||||
if (m_ssAllowedHosts.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user