2014-02-11 05:44:19 +01:00
<? AddRow JSLoop HREF=/modfiles/global/webadmin/webadmin.js ?>
<? INC Header.tmpl ?>
2014-09-19 20:19:24 +02:00
<form class="form-horizontal" role="form" action="<? IF Edit ?>editnetwork<? ELSE ?>addnetwork<? ENDIF ?>" method="post">
<? INC _csrf_check.tmpl ?>
<div class="section">
<input type="hidden" name="submitted" value="1" />
<input type="hidden" name="user" value="<? VAR Username ?>" />
<input type="hidden" name="network" value="<? VAR Name ?>" />
2015-07-20 07:35:19 +02:00
<div class="container col-md-10 col-md-offset-1">
2014-09-19 20:19:24 +02:00
<div class="panel with-nav-tabs panel-default">
<div class="panel-heading">
<ul class="nav nav-tabs">
<li class="active"><a href=" #netinfotab " data-toggle= " tab " >Network Info</a></li>
<li><a href=" #floodprotab " data-toggle= " tab " >Flood Protection</a></li>
2015-01-19 05:14:44 +01:00
<li><a href=" #charencodetab " data-toggle= " tab " >Character Encoding</a></li>
2014-09-19 20:19:24 +02:00
<li><a href=" #channelstab " data-toggle= " tab " >Channels</a></li>
<li><a href=" #modulestab " data-toggle= " tab " >Modules</a></li>
</ul>
2015-07-20 07:35:19 +02:00
</div>
2014-09-19 20:19:24 +02:00
<div class="panel-body">
<div class="tab-content">
<!-- Network Info -->
<div class="tab-pane fade in active" id="netinfotab">
2014-02-11 05:44:19 +01:00
<div class="alert alert-warning">To connect to this network from your IRC client, you can set the server password field as follows: <code><? VAR Username ?>/<? IF Edit ?><? VAR Name ?><? ELSE ?><network><? ENDIF ?>:<password></code> or username field as <code><? VAR Username ?>/<? IF Edit ?><? VAR Name ?><? ELSE ?><network><? ENDIF ?></code></div>
<div class="alert alert-info">Nick, AltNick, Ident, RealName, BindHost can be left empty to use the value from the user.</div>
2015-07-20 07:35:19 +02:00
2014-09-19 20:19:24 +02:00
<div class="form-group">
2014-02-11 05:44:19 +01:00
<label for="inputNetworkName" class="col-sm-2 control-label">Network Name:</label>
<div class="col-sm-10">
2014-09-19 20:19:24 +02:00
<input type="text" class="form-control" id="inputNetworkName" name="name" value="<? VAR Name ?>" maxlength="20" placeholder="The name of the IRC network.">
2014-02-11 05:44:19 +01:00
</div>
2015-07-20 07:35:19 +02:00
</div>
2014-09-19 20:19:24 +02:00
<div class="form-group">
2014-02-11 05:44:19 +01:00
<label for="inputNickname" class="col-sm-2 control-label">Nickname:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputNickname" name="nick" value="<? VAR Nick ?>" maxlength="30" placeholder="Your nickname on IRC.">
</div>
2014-09-19 20:19:24 +02:00
</div>
2015-07-20 07:35:19 +02:00
2014-09-19 20:19:24 +02:00
<div class="form-group">
2014-02-11 05:44:19 +01:00
<label for="inputAltNickname" class="col-sm-2 control-label">Alt. Nickname:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="AltNickname" name="altnick" value="<? VAR AltNick ?>" maxlength="30" placeholder="Your secondary nickname, if the first is not available on IRC.">
</div>
2014-09-19 20:19:24 +02:00
</div>
2015-07-20 07:35:19 +02:00
2014-09-19 20:19:24 +02:00
<div class="form-group">
2014-02-11 05:44:19 +01:00
<label for="inputIdent" class="col-sm-2 control-label">Ident:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputIdent" name="ident" value="<? VAR Ident ?>" maxlength="30" placeholder="Your ident.">
</div>
2014-09-19 20:19:24 +02:00
</div>
2015-07-20 07:35:19 +02:00
2014-09-19 20:19:24 +02:00
<div class="form-group">
2014-02-11 05:44:19 +01:00
<label for="inputRealname" class="col-sm-2 control-label">Realname:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputRealname" name="realname" value="<? VAR RealName ?>" maxlength="128" placeholder="Your real name.">
</div>
2014-09-19 20:19:24 +02:00
</div>
2015-07-20 07:35:19 +02:00
2014-09-19 20:19:24 +02:00
<? IF BindHostEdit ?>
<div class="form-group">
2014-02-11 05:44:19 +01:00
<label for="inputBindHost" class="col-sm-2 control-label">BindHost:</label>
<div class="col-sm-10">
<? IF BindHostLoop ?>
<select class="form-control" name="bindhost">
<option value="">Default</option>
<? LOOP BindHostLoop ?>
<option value="<? VAR BindHost ?>"<? IF Checked ?> selected="selected"<? ENDIF ?>><? VAR BindHost ?></option>
<? ENDLOOP ?>
</select>
<? ELSE ?>
<input class="form-control" type="text" name="bindhost" value="<? VAR BindHost ?>"/>
<? ENDIF ?>
</div>
2014-09-19 20:19:24 +02:00
</div>
<? ENDIF ?>
2015-07-20 07:35:19 +02:00
2014-09-19 20:19:24 +02:00
<div class="form-group">
<label for="inputQuit" class="col-sm-2 control-label">Quit Message:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputQuit" name="quitmsg" value="<? VAR QuitMsg ?>" maxlength="256" placeholder="You may define a Message shown, when you quit IRC.">
</div>
2015-07-20 07:35:19 +02:00
</div>
2014-02-11 05:44:19 +01:00
2014-09-19 20:19:24 +02:00
<div class="form-group">
2014-02-11 05:44:19 +01:00
<label for="inputActive" class="col-sm-2 control-label">Active:</label>
<div class="col-sm-10">
2014-09-19 20:19:24 +02:00
<div class="switch">
<input type="checkbox" value="1" name="doconnect" class="cmn-toggle cmn-toggle-round-flat" id="doconnect_checkbox"<? IF IRCConnectEnabled ?> checked="checked"<? ENDIF ?> />
2014-02-11 05:44:19 +01:00
<label for="doconnect_checkbox"></label>
<span class="help-block">Connect to IRC & automatically re-connect</span>
</div>
</div>
2015-07-20 07:35:19 +02:00
</div>
<div class="form-group" id="servers_plain">
2014-02-11 05:44:19 +01:00
<label for="inputServers" class="col-sm-2 control-label">Servers of this IRC network:</label>
<div class="col-sm-10">
2015-07-20 07:35:19 +02:00
<textarea class="form-control" name="servers" cols="70" rows="5" id="servers_text"><? LOOP ServerLoop ?><? VAR Server ?>
<? ENDLOOP ?></textarea>
2014-02-11 05:44:19 +01:00
<span class="help-block">One server per line, "host [[+]port] [password]", + means SSL</span>
2015-07-20 07:35:19 +02:00
<br/>
</div>
</div>
<div class="form-group" id="servers_js" style="display:none">
<label for="inputServers" class="col-sm-2 control-label">Servers of this IRC network:</label>
<div class="col-sm-10">
<table class="table table-hover">
<thead>
<tr>
<th>Hostname</th>
<th>Port</th>
<th>SSL</th>
<th>Password</th>
<th/>
</tr>
</thead>
<tbody id="servers_tbody">
<tr>
</tr>
</tbody>
</table>
<button type="button" class="btn btn-default" value="Add" id="servers_add">Add New Server</button>
2014-02-11 05:44:19 +01:00
</div>
2015-07-20 07:35:19 +02:00
</div>
<script type="text/javascript">serverlist_init(jQuery);</script>
2015-01-19 05:14:44 +01:00
<div class="form-group">
<label for="inputTrustedSSL" class="col-sm-2 control-label">Trusted SSL fingerprints of this IRC network:</label>
<div class="col-sm-10">
2015-07-20 07:35:19 +02:00
<textarea class="form-control" name="fingerprints" rows="3"><? LOOP TrustedFingerprints ?><? VAR FP ?>
<? ENDLOOP ?></textarea>
2015-01-19 05:14:44 +01:00
<span class="help-block">When these certificates are encountered, checks for hostname, expiration date, CA are skipped</span>
</div>
2015-07-20 07:35:19 +02:00
</div>
2014-09-19 20:19:24 +02:00
</div> <!-- Network Info -->
2015-07-20 07:35:19 +02:00
2014-09-19 20:19:24 +02:00
<!-- Flood Protection -->
<div class="tab-pane fade" id="floodprotab">
<div class="form-group">
2014-02-11 05:44:19 +01:00
<label for="inputFloodpro" class="col-sm-2 control-label">Flood protection:</label>
<div class="col-sm-10">
2014-09-19 20:19:24 +02:00
<div class="switch">
<input type="checkbox" name="floodprotection" id="floodprotection_checkbox" class="cmn-toggle cmn-toggle-round-flat" onchange="floodprotection_change();" <? IF FloodProtection ?>checked="checked"<? ENDIF ?> />
2014-02-11 05:44:19 +01:00
<label for="floodprotection_checkbox"></label>
2015-01-19 05:14:44 +01:00
<span class="help-block">You might enable the flood protection. This prevents `excess flood' errors, which occur, when your IRC bot is command flooded or spammed. After changing this, reconnect ZNC to server</span>
2014-02-11 05:44:19 +01:00
</div>
</div>
2015-07-20 07:35:19 +02:00
</div>
2014-09-19 20:19:24 +02:00
<div class="form-group">
2014-02-11 05:44:19 +01:00
<label for="inputFloodproRate" class="col-sm-2 control-label">Flood protection rate:</label>
<div class="col-sm-10">
2015-01-19 05:14:44 +01:00
<input class="form-control" type="number" name="floodrate" min="0.3" step="0.05" id="floodrate" placeholder="The number of seconds per line." <? IF FloodProtection ?> value="<? VAR FloodRate ?>" <? ELSE ?> value="1.00" disabled="disabled" <? ENDIF ?> />
<span class="help-block">The number of seconds per line. After changing this, reconnect ZNC to server</span>
2014-02-11 05:44:19 +01:00
</div>
2015-07-20 07:35:19 +02:00
</div>
2014-09-19 20:19:24 +02:00
<div class="form-group">
2014-02-11 05:44:19 +01:00
<label for="inputFloodproBurst" class="col-sm-2 control-label">Flood protection burst:</label>
<div class="col-sm-10">
2015-07-20 07:35:19 +02:00
<input type="number" class="form-control" name="floodburst" min="1" id="inputFloodproBurst floodburst" <? IF FloodProtection ?> value="<? VAR FloodBurst ?>" <? ELSE ?> value="4" disabled="disabled" <? ENDIF ?> />
2015-01-19 05:14:44 +01:00
<span class="help-block">Defines the number of lines, which can be sent immediately. After changing this, reconnect ZNC to server</span>
2014-02-11 05:44:19 +01:00
</div>
2015-07-20 07:35:19 +02:00
</div>
2014-10-30 17:40:38 +01:00
<div class="form-group">
2015-01-19 05:14:44 +01:00
<label for="inputChanjoindelay" class="col-sm-2 control-label">Channel join delay:</label>
2014-10-30 17:40:38 +01:00
<div class="col-sm-10">
2015-07-20 07:35:19 +02:00
<input type="number" class="form-control" name="joindelay" min="0" id="inputChanjoindelay joindelay" value="<? VAR JoinDelay ?>" />
2015-01-19 05:14:44 +01:00
<span class="help-block">Defines the delay in seconds, until channels are joined after getting connected</span>
2014-10-30 17:40:38 +01:00
</div>
2015-07-20 07:35:19 +02:00
</div>
2015-01-19 05:14:44 +01:00
2014-09-19 20:19:24 +02:00
<script type="text/javascript">floodprotection_change();</script>
</div> <!-- Flood Protection -->
2015-07-20 07:35:19 +02:00
2015-01-19 05:14:44 +01:00
<!-- Server Encoding -->
<div class="tab-pane fade" id="charencodetab">
<div class="form-group">
<label for="inputChanencode" class="col-sm-2 control-label">Server encoding:</label>
<div class="col-sm-10">
<? INC encoding_settings.tmpl ?>
2015-07-20 07:35:19 +02:00
</div>
</div>
2015-01-19 05:14:44 +01:00
</div> <!-- Server Encoding -->
2015-07-20 07:35:19 +02:00
2014-09-19 20:19:24 +02:00
<!-- Channels -->
<div class="tab-pane fade" id="channelstab">
<? IF !Edit ?>
<span class="info">You will be able to add + modify channels here after you created the network.</span><br />
<? ELSE ?>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<td><a href="addchan?user=<? VAR Username ESC=URL ?>&network=<? VAR Name ESC=URL ?>" class="btn btn-primary btn-xs">Add</a></td>
<? IF ChannelLoop ?>
<td>Save</td>
<td>Name</td>
<td>CurModes</td>
<td>DefModes</td>
<td>BufferCount</td>
<td>Options</td>
<? ELSE ?>
<td><- Add a channel (opens in same page)</td>
<? ENDIF ?>
</tr>
</thead>
<tbody>
<? LOOP ChannelLoop SORTASC=Name ?>
<tr>
<td>
2015-07-20 07:35:19 +02:00
<input type="hidden" name="channel" value="<? VAR Name ?>" /> <a href="editchan?user=<? VAR Username ESC=URL ?>&network=<? VAR Network ESC=URL ?>&name=<? VAR Name ESC=URL ?>" class="btn btn-warning btn-xs">Edit</a> <a href="delchan?user=<? VAR Username ESC=URL ?>&network=<? VAR Network ESC=URL ?>&name=<? VAR Name ESC=URL ?>" class="btn btn-danger btn-xs">Del</a>
2014-09-19 20:19:24 +02:00
</td>
<td class="text-center">
<div class="switch">
<input type="checkbox" name="save_<? VAR Name ?>" class="cmn-toggle cmn-toggle-round-flat"<? IF InConfig ?> checked="checked"<? ENDIF ?> />
<label for="save_<? VAR Name ?>"></label>
</div>
</td>
<td><? VAR Name ?></td>
<td><? VAR CurModes ?></td>
<td><? VAR DefModes ?></td>
<td><? VAR BufferCount ?></td>
<td><? VAR Options ?></td>
</tr>
<? ENDLOOP ?>
</tbody>
</table>
<? ENDIF ?>
</div> <!-- Channels -->
2015-07-20 07:35:19 +02:00
2014-09-19 20:19:24 +02:00
<!-- Modules -->
<div class="tab-pane fade" id="modulestab">
2014-02-11 05:44:19 +01:00
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<td>Status</td>
<td>Name</td>
<td>Arguments</td>
<td>Description</td>
2014-09-19 20:19:24 +02:00
<td>Global</td>
<td>Networks</td>
2014-02-11 05:44:19 +01:00
</tr>
</thead>
<tbody>
<? LOOP ModuleLoop ?>
<tr>
<td>
2014-09-19 20:19:24 +02:00
<div class="switch">
<input type="checkbox" name="loadmod" id="lm_<? VAR Name ?>" class="cmn-toggle cmn-toggle-round-flat" value="<? VAR Name ?>"<? IF Checked ?> checked="checked"<? ENDIF ?><? IF Disabled ?> disabled="disabled"<? ENDIF ?> />
2014-02-11 05:44:19 +01:00
<label for="lm_<? VAR Name ?>"></label>
</div>
</td>
<td>
<label for="lm_<? VAR Name ?>"> <? IF Wiki ?><a href="http://wiki.znc.in/<? VAR Wiki ?>" target="_blank"><? VAR Name ?></a> <? ELSE ?> <? VAR Name ?> <? ENDIF ?></label>
</td>
<td>
<? IF Disabled ?>
<? VAR Args ?>
<? ELSE ?>
<input class="form-control" class="third" type="text" name="modargs_<? VAR Name ?>" value="<? VAR Args ?>"
<? IF !HasArgs ?> disabled="disabled"<? ENDIF ?>
2014-09-19 20:19:24 +02:00
<? IF ArgsHelpText ?> data-toggle="tooltip" data-placement="top" data-original-title="<? VAR ArgsHelpText ?>"<? ENDIF ?> autocomplete="off"/>
2014-02-11 05:44:19 +01:00
<? ENDIF ?>
</td>
<td><? VAR Description ?></td>
2014-09-19 20:19:24 +02:00
<td>
<? IF CanBeLoadedGlobally ?>
<div class="checkboxSwitchMini">
<input type="checkbox" name="loaded_globally" id="loaded_globally_<? VAR Name ?>" value="<? VAR Name ?>"<? IF LoadedGloabally?> checked="checked" <? ENDIF ?> class="sr-only" disabled="disabled" /> <? ENDIF ?>
<label for="loaded_globally_<? VAR Name ?>"></label>
</div>
<? ENDIF ?>
</td>
<td>
2015-07-20 07:35:19 +02:00
<? IF CanBeLoadedByUser ?>
2014-09-19 20:19:24 +02:00
<div class="checkboxSwitchMini">
<input type="checkbox" name="loaded_by_user" id="loaded_by_user_<? VAR Name ?>" value="<? VAR Name ?>"<? IF LoadedByUser ?> checked="checked" <? ENDIF ?> class="sr-only" disabled="disabled" /> <? ENDIF ?>
<label for="loaded_by_user_<? VAR Name ?>"></label>
</div>
<? ENDIF ?>
</td>
2014-02-11 05:44:19 +01:00
</tr>
<? ENDLOOP ?>
</tbody>
</table>
2014-09-19 20:19:24 +02:00
</div> <!-- Modules -->
2015-07-20 07:35:19 +02:00
2014-09-19 20:19:24 +02:00
<!-- Other Modules -->
<div class="tab-pane fade" id="othermods">
<? LOOP EmbeddedModuleLoop ?>
<? IF Embed ?>
<h3>Module <? VAR ModName ?></h3>
<? INC *Embed ?>
<? ENDIF ?>
<? ENDLOOP ?>
</div> <!-- Other Modules -->
2014-02-11 05:44:19 +01:00
</div>
2015-07-20 07:35:19 +02:00
</div>
2014-09-19 20:19:24 +02:00
<div class="panel-footer text-right">
<input class="btn btn-danger" type="reset" value="Reset">
<input class="btn btn-success" type="submit" name="submit_return" value="<? IF Edit ?>Save<? ELSE ?>Save Network<? ENDIF ?>" />
<input class="btn btn-default" type="submit" name="submit_continue" value="<? IF Edit ?>Save and continue<? ELSE ?>Save and continue<? ENDIF ?>" />
</div>
2015-07-20 07:35:19 +02:00
2014-02-11 05:44:19 +01:00
</div>
2014-09-19 20:19:24 +02:00
</div>
2015-07-20 07:35:19 +02:00
</form>
<? INC Footer.tmpl ?>