mirror of
https://github.com/znc/znc.git
synced 2026-05-04 04:22:37 +02:00
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:
1
User.cpp
1
User.cpp
@@ -445,6 +445,7 @@ bool CUser::Clone(const CUser& User, CString& sErrorRet, bool bCloneChans) {
|
||||
// !CTCP Replies
|
||||
|
||||
// Flags
|
||||
SetIRCConnectEnabled(User.GetIRCConnectEnabled());
|
||||
SetKeepBuffer(User.KeepBuffer());
|
||||
SetMultiClients(User.MultiClients());
|
||||
SetBounceDCCs(User.BounceDCCs());
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -91,6 +91,12 @@
|
||||
</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Active:</td>
|
||||
<td><input type="checkbox" class="checkbox" name="doconnect" id="doconnect_checkbox"<? IF IRCConnectEnabled ?> checked="checked"<? ENDIF ?> />
|
||||
<label for="doconnect_checkbox">Connect to IRC & automatically re-connect</label></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user