mirror of
https://github.com/znc/znc.git
synced 2026-07-04 17:01:23 +02:00
webadmin: let specify join delay for networks
This commit is contained in:
@@ -104,6 +104,14 @@
|
||||
<? IF FloodProtection ?> value="<? VAR FloodBurst ?>" <? ELSE ?> value="4" disabled="disabled" <? ENDIF ?>
|
||||
/> lines can be sent immediately
|
||||
</div>
|
||||
|
||||
<div class="subsection">
|
||||
<div class="inputlabel">Channel join delay:</div>
|
||||
<input type="number" name="joindelay" min="0" id="joindelay"
|
||||
title="Defines the delay in seconds, until channels are joined after getting connected."
|
||||
value="<? VAR JoinDelay ?>"
|
||||
/> seconds
|
||||
</div>
|
||||
<script type="text/javascript">floodprotection_change();</script>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
|
||||
@@ -821,6 +821,8 @@ public:
|
||||
Tmpl["FloodRate"] = CString(pNetwork->GetFloodRate());
|
||||
Tmpl["FloodBurst"] = CString(pNetwork->GetFloodBurst());
|
||||
|
||||
Tmpl["JoinDelay"] = CString(pNetwork->GetJoinDelay());
|
||||
|
||||
Tmpl["IRCConnectEnabled"] = CString(pNetwork->GetIRCConnectEnabled());
|
||||
|
||||
const vector<CServer*>& vServers = pNetwork->GetServers();
|
||||
@@ -863,6 +865,7 @@ public:
|
||||
Tmpl["FloodProtection"] = "true";
|
||||
Tmpl["FloodRate"] = "1.0";
|
||||
Tmpl["FloodBurst"] = "4";
|
||||
Tmpl["JoinDelay"] = "0";
|
||||
}
|
||||
|
||||
FOR_EACH_MODULE(i, make_pair(pUser, pNetwork)) {
|
||||
@@ -946,6 +949,8 @@ public:
|
||||
pNetwork->SetFloodRate(-1);
|
||||
}
|
||||
|
||||
pNetwork->SetJoinDelay(WebSock.GetParam("joindelay").ToUShort());
|
||||
|
||||
VCString vsArgs;
|
||||
|
||||
pNetwork->DelServers();
|
||||
|
||||
Reference in New Issue
Block a user