Merge branch 'master' of github.com:znc/znc

This commit is contained in:
Alexey Sokolov
2015-08-04 23:48:52 +01:00
4 changed files with 10 additions and 3 deletions
+1
View File
@@ -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; }
+2
View File
@@ -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);
+1 -3
View File
@@ -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);
}
+6
View File
@@ -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()) {