From: <ps...@us...> - 2010-12-31 09:14:27
|
Revision: 2229 http://znc.svn.sourceforge.net/znc/?rev=2229&view=rev Author: psychon Date: 2010-12-31 09:14:21 +0000 (Fri, 31 Dec 2010) Log Message: ----------- webadmin: Add all currently missing global settings These were MaxBufferSize, ConnectDelay, ServerThrottle and AnonIPLimit. Modified Paths: -------------- trunk/modules/webadmin/tmpl/settings.tmpl trunk/modules/webadmin.cpp Modified: trunk/modules/webadmin/tmpl/settings.tmpl =================================================================== --- trunk/modules/webadmin/tmpl/settings.tmpl 2010-12-31 09:14:03 UTC (rev 2228) +++ trunk/modules/webadmin/tmpl/settings.tmpl 2010-12-31 09:14:21 UTC (rev 2229) @@ -78,6 +78,30 @@ </div> <div style="clear: both;"></div> + <div class="subsection half"> + <div class="inputlabel">Maximum Buffer Size:</div> + <div><input type="text" name="maxbufsize" value="<? VAR MaxBufferSize ?>" /></div> + </div> + <div style="clear: both;"></div> + + <div class="subsection half"> + <div class="inputlabel">Connect Delay:</div> + <div><input type="text" name="connectdelay" value="<? VAR ConnectDelay ?>" /></div> + </div> + <div style="clear: both;"></div> + + <div class="subsection half"> + <div class="inputlabel">Server Throttle:</div> + <div><input type="text" name="serverthrottle" value="<? VAR ServerThrottle ?>" /></div> + </div> + <div style="clear: both;"></div> + + <div class="subsection half"> + <div class="inputlabel">Anonymous IP Limit:</div> + <div><input type="text" name="anoniplimit" value="<? VAR AnonIPLimit ?>" /></div> + </div> + <div style="clear: both;"></div> + <div class="subsection twothird"> <div class="inputlabel">MOTD:</div> <div><textarea name="motd" cols="70" rows="5" class="monospace"><? LOOP MOTDLoop ?><? VAR Line ?> Modified: trunk/modules/webadmin.cpp =================================================================== --- trunk/modules/webadmin.cpp 2010-12-31 09:14:03 UTC (rev 2228) +++ trunk/modules/webadmin.cpp 2010-12-31 09:14:21 UTC (rev 2229) @@ -971,6 +971,10 @@ Tmpl["StatusPrefix"] = CZNC::Get().GetStatusPrefix(); Tmpl["ISpoofFile"] = CZNC::Get().GetISpoofFile(); Tmpl["ISpoofFormat"] = CZNC::Get().GetISpoofFormat(); + Tmpl["MaxBufferSize"] = CString(CZNC::Get().GetMaxBufferSize()); + Tmpl["ConnectDelay"] = CString(CZNC::Get().GetConnectDelay()); + Tmpl["ServerThrottle"] = CString(CZNC::Get().GetServerThrottle()); + Tmpl["AnonIPLimit"] = CString(CZNC::Get().GetAnonIPLimit()); const VCString& vsBindHosts = CZNC::Get().GetBindHosts(); for (unsigned int a = 0; a < vsBindHosts.size(); a++) { @@ -1059,7 +1063,10 @@ sArg = WebSock.GetParam("statusprefix"); CZNC::Get().SetStatusPrefix(sArg); sArg = WebSock.GetParam("ispooffile"); CZNC::Get().SetISpoofFile(sArg); sArg = WebSock.GetParam("ispoofformat"); CZNC::Get().SetISpoofFormat(sArg); - //sArg = GetParam(""); if (!sArg.empty()) { CZNC::Get().Set(sArg); } + sArg = WebSock.GetParam("maxbufsize"); CZNC::Get().SetMaxBufferSize(sArg.ToUInt()); + sArg = WebSock.GetParam("connectdelay"); CZNC::Get().SetConnectDelay(sArg.ToUInt()); + sArg = WebSock.GetParam("serverthrottle"); CZNC::Get().SetServerThrottle(sArg.ToUInt()); + sArg = WebSock.GetParam("anoniplimit"); CZNC::Get().SetAnonIPLimit(sArg.ToUInt()); VCString vsArgs; WebSock.GetRawParam("motd").Split("\n", vsArgs); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |