mirror of
https://github.com/znc/znc.git
synced 2026-08-06 08:52:57 +02:00
Revert "Rewrite the JOIN channel logic, dropping MaxJoins"
This reverts commit db7c47f97d.
Too many joined channels at once started to cause disconnect because of
"Max SendQ Exceeded", which is not much better than previous Flood.
Now MaxJoins is 0 by default, which preserves the current behavior of
joining all channels at once. If someone experiences those disconnects
due to SendQ, they can tune MaxJoins.
Fix #329
Conflicts:
include/znc/User.h
modules/controlpanel.cpp
modules/webadmin.cpp
src/User.cpp
This commit is contained in:
@@ -59,6 +59,7 @@ class CAdminMod : public CModule {
|
||||
{"AutoClearChanBuffer", boolean},
|
||||
{"Password", str},
|
||||
{"JoinTries", integer},
|
||||
{"MaxJoins", integer},
|
||||
{"Timezone", str},
|
||||
{"Admin", boolean},
|
||||
{"AppendTimestamp", boolean},
|
||||
@@ -177,6 +178,8 @@ class CAdminMod : public CModule {
|
||||
PutModule("KeepBuffer = " + CString(!pUser->AutoClearChanBuffer())); // XXX compatibility crap, added in 0.207
|
||||
else if (sVar == "autoclearchanbuffer")
|
||||
PutModule("AutoClearChanBuffer = " + CString(pUser->AutoClearChanBuffer()));
|
||||
else if (sVar == "maxjoins")
|
||||
PutModule("MaxJoins = " + CString(pUser->MaxJoins()));
|
||||
else if (sVar == "jointries")
|
||||
PutModule("JoinTries = " + CString(pUser->JoinTries()));
|
||||
else if (sVar == "timezone")
|
||||
@@ -292,6 +295,11 @@ class CAdminMod : public CModule {
|
||||
pUser->SetPass(sHash, CUser::HASH_DEFAULT, sSalt);
|
||||
PutModule("Password has been changed!");
|
||||
}
|
||||
else if (sVar == "maxjoins") {
|
||||
unsigned int i = sValue.ToUInt();
|
||||
pUser->SetMaxJoins(i);
|
||||
PutModule("MaxJoins = " + CString(pUser->MaxJoins()));
|
||||
}
|
||||
else if (sVar == "jointries") {
|
||||
unsigned int i = sValue.ToUInt();
|
||||
pUser->SetJoinTries(i);
|
||||
|
||||
Reference in New Issue
Block a user