Added "Connect to IRC & automatically re-connect" checkbox to webadmin.

Sets the internal "automatically connect" flag just like /msg *status connect and
/msg *status disconnect do. Idea by Advis0r, thanks!


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1851 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
cflakes
2010-03-30 09:16:09 +00:00
parent 72293bed64
commit bb79dd338f
3 changed files with 10 additions and 0 deletions

View File

@@ -156,6 +156,7 @@ public:
pNewUser->SetTimezoneOffset(WebSock.GetParam("timezoneoffset").ToDouble());
pNewUser->SetJoinTries(WebSock.GetParam("jointries").ToUInt());
pNewUser->SetMaxJoins(WebSock.GetParam("maxjoins").ToUInt());
pNewUser->SetIRCConnectEnabled(WebSock.GetParam("doconnect").ToBool());
if (spSession->IsAdmin()) {
pNewUser->SetDenyLoadMod(WebSock.GetParam("denyloadmod").ToBool());
@@ -466,6 +467,7 @@ public:
Tmpl["TimezoneOffset"] = CString(pUser->GetTimezoneOffset());
Tmpl["JoinTries"] = CString(pUser->JoinTries());
Tmpl["MaxJoins"] = CString(pUser->MaxJoins());
Tmpl["IRCConnectEnabled"] = CString(pUser->GetIRCConnectEnabled());
const set<CString>& ssAllowedHosts = pUser->GetAllowedHosts();
for (set<CString>::const_iterator it = ssAllowedHosts.begin(); it != ssAllowedHosts.end(); ++it) {
@@ -506,6 +508,7 @@ public:
Tmpl["Action"] = "adduser";
Tmpl["Title"] = "Add User";
Tmpl["StatusPrefix"] = "*";
Tmpl["IRCConnectEnabled"] = "true";
}
// To change VHosts be admin or don't have DenySetVHost