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:
Alexey Sokolov
2013-06-09 22:57:49 +04:00
parent 516b3fbeb2
commit a06b6495e8
7 changed files with 74 additions and 33 deletions

View File

@@ -269,6 +269,7 @@ public:
pNewUser->SetTimestampPrepend(WebSock.GetParam("prependtimestamp").ToBool());
pNewUser->SetTimezone(WebSock.GetParam("timezone"));
pNewUser->SetJoinTries(WebSock.GetParam("jointries").ToUInt());
pNewUser->SetMaxJoins(WebSock.GetParam("maxjoins").ToUInt());
if (spSession->IsAdmin()) {
pNewUser->SetDenyLoadMod(WebSock.GetParam("denyloadmod").ToBool());
@@ -1073,6 +1074,7 @@ public:
Tmpl["Timezone"] = pUser->GetTimezone();
Tmpl["JoinTries"] = CString(pUser->JoinTries());
Tmpl["MaxNetworks"] = CString(pUser->MaxNetworks());
Tmpl["MaxJoins"] = CString(pUser->MaxJoins());
const set<CString>& ssAllowedHosts = pUser->GetAllowedHosts();
for (set<CString>::const_iterator it = ssAllowedHosts.begin(); it != ssAllowedHosts.end(); ++it) {