mirror of
https://github.com/znc/znc.git
synced 2026-06-19 09:35:27 +02:00
Add a way to disable certain capabilities
This is a way for admins to mitigate some issues caused by caps if such issues ever arise. E.g. add this to global level in znc.conf: DisableClientCap = sasl DisableServerCap = chghost DisableServerCap = message-tags Then these caps will be NAKed to client / not requested from server. Note that this mechanism doesn't fully prevent a cap from being activated, e.g. one could use *send_raw module to request it from server even when disabled.
This commit is contained in:
@@ -416,6 +416,9 @@ bool CIRCSock::OnCapabilityMessage(CMessage& Message) {
|
||||
sCap = sToken.substr(0, eq);
|
||||
sValue = sToken.substr(eq + 1);
|
||||
}
|
||||
if (CZNC::Get().GetServerCapBlacklist().count(sCap)) {
|
||||
continue;
|
||||
}
|
||||
m_msCapLsValues[sCap] = sValue;
|
||||
if (OnServerCapAvailable(sCap, sValue) || mSupportedCaps.count(sCap)) {
|
||||
m_ssPendingCaps.insert(sCap);
|
||||
|
||||
Reference in New Issue
Block a user