mirror of
https://github.com/znc/znc.git
synced 2026-05-14 21:35:47 +02:00
Fix #680 - make channels follow user-level settings when appropriate
This commit is contained in:
+13
-3
@@ -684,10 +684,16 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
pChan->SetBufferCount(WebSock.GetParam("buffercount").ToUInt(), spSession->IsAdmin());
|
||||
unsigned int uBufferCount = WebSock.GetParam("buffercount").ToUInt();
|
||||
if (pChan->GetBufferCount() != uBufferCount) {
|
||||
pChan->SetBufferCount(uBufferCount, spSession->IsAdmin());
|
||||
}
|
||||
pChan->SetDefaultModes(WebSock.GetParam("defmodes"));
|
||||
pChan->SetInConfig(WebSock.GetParam("save").ToBool());
|
||||
pChan->SetAutoClearChanBuffer(WebSock.GetParam("autoclearchanbuffer").ToBool());
|
||||
bool bAutoClearChanBuffer = WebSock.GetParam("autoclearchanbuffer").ToBool();
|
||||
if (pChan->AutoClearChanBuffer() != bAutoClearChanBuffer) {
|
||||
pChan->SetAutoClearChanBuffer(WebSock.GetParam("autoclearchanbuffer").ToBool());
|
||||
}
|
||||
pChan->SetKey(WebSock.GetParam("key"));
|
||||
|
||||
bool bDetached = WebSock.GetParam("detached").ToBool();
|
||||
@@ -834,7 +840,11 @@ public:
|
||||
l["Perms"] = pChan->GetPermStr();
|
||||
l["CurModes"] = pChan->GetModeString();
|
||||
l["DefModes"] = pChan->GetDefaultModes();
|
||||
l["BufferCount"] = CString(pChan->GetBufferCount());
|
||||
if (pChan->HasBufferCountSet()) {
|
||||
l["BufferCount"] = CString(pChan->GetBufferCount());
|
||||
} else {
|
||||
l["BufferCount"] = CString(pChan->GetBufferCount()) + " (default)";
|
||||
}
|
||||
l["Options"] = pChan->GetOptions();
|
||||
|
||||
if (pChan->InConfig()) {
|
||||
|
||||
Reference in New Issue
Block a user