From 85a70a418c95ffdfeeb031162dcc32fb670bdd29 Mon Sep 17 00:00:00 2001 From: psychon Date: Wed, 3 Sep 2008 14:28:18 +0000 Subject: [PATCH] Add JoinTries and MaxJoins config options to webadmin This also changes the layout of the default skin a little, because it was a little messed up. I still don't like the result, but meh, send patches! git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1187 726aef4b-f618-498e-8847-2d620e286838 --- modules/webadmin.cpp | 4 ++++ modules/webadmin/skins/default/UserPage.tmpl | 16 ++++++++++++---- modules/webadmin/skins/graphiX/UserPage.tmpl | 20 ++++++++++++++++++++ modules/webadmin/skins/ice/UserPage.tmpl | 9 +++++++++ 4 files changed, 45 insertions(+), 4 deletions(-) diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp index edd2eb85..10617878 100644 --- a/modules/webadmin.cpp +++ b/modules/webadmin.cpp @@ -789,6 +789,8 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) { m_Template["BufferCount"] = CString(pUser->GetBufferCount()); m_Template["TimestampFormat"] = pUser->GetTimestampFormat(); m_Template["TimezoneOffset"] = CString(pUser->GetTimezoneOffset()); + m_Template["JoinTries"] = CString(pUser->JoinTries()); + m_Template["MaxJoins"] = CString(pUser->MaxJoins()); const set& ssAllowedHosts = pUser->GetAllowedHosts(); for (set::const_iterator it = ssAllowedHosts.begin(); it != ssAllowedHosts.end(); it++) { @@ -1115,6 +1117,8 @@ CUser* CWebAdminSock::GetNewUser(CString& sPageRet, CUser* pUser) { pNewUser->SetTimestampAppend(GetParam("appendtimestamp").ToBool()); pNewUser->SetTimestampPrepend(GetParam("prependtimestamp").ToBool()); pNewUser->SetTimezoneOffset(GetParam("timezoneoffset").ToDouble()); + pNewUser->SetJoinTries(GetParam("jointries").ToUInt()); + pNewUser->SetMaxJoins(GetParam("maxjoins").ToUInt()); if (IsAdmin()) { pNewUser->SetDenyLoadMod(GetParam("denyloadmod").ToBool()); diff --git a/modules/webadmin/skins/default/UserPage.tmpl b/modules/webadmin/skins/default/UserPage.tmpl index 44ced8e9..36f708ba 100644 --- a/modules/webadmin/skins/default/UserPage.tmpl +++ b/modules/webadmin/skins/default/UserPage.tmpl @@ -177,18 +177,26 @@
ZNC Behavior
+
+
Timestamp Format:
+
+
Playback Buffer Size:
-
-
Timestamp Format:
-
-
Timezone offset:
+
+
Join Tries:
+
+
+
+
Max Joins:
+
+
diff --git a/modules/webadmin/skins/graphiX/UserPage.tmpl b/modules/webadmin/skins/graphiX/UserPage.tmpl index 672b53e1..c7ce84e9 100644 --- a/modules/webadmin/skins/graphiX/UserPage.tmpl +++ b/modules/webadmin/skins/graphiX/UserPage.tmpl @@ -271,6 +271,26 @@ + + + Join Tries: + + + + + + + + + + Max Joins: + + + + + + + Options: diff --git a/modules/webadmin/skins/ice/UserPage.tmpl b/modules/webadmin/skins/ice/UserPage.tmpl index 77b1ea81..f6ae2e4e 100644 --- a/modules/webadmin/skins/ice/UserPage.tmpl +++ b/modules/webadmin/skins/ice/UserPage.tmpl @@ -188,6 +188,15 @@
Timezone offset:
+
+
Join Tries:
+
+
+
+
Max Joins:
+
+
+