Rename the shitlist and blocklist

This commit is contained in:
zzz
2009-08-08 17:14:30 +00:00
parent d3a0c91398
commit 4cf376ec1d
5 changed files with 18 additions and 18 deletions

View File

@ -20,22 +20,22 @@ public class ConfigPeerHandler extends FormHandler {
if ("Save Configuration".equals(_action)) {
_context.router().saveConfig();
addFormNotice("Settings saved - not really!!!!!");
} else if (_action.startsWith("Shitlist")) {
} else if (_action.startsWith("Ban")) {
Hash h = getHash();
if (h != null) {
_context.shitlist().shitlistRouterForever(h, "Manually shitlisted via <a href=\"configpeer.jsp\">configpeer.jsp</a>");
addFormNotice("Peer " + _peer + " shitlisted forever");
_context.shitlist().shitlistRouterForever(h, "Manually banned via <a href=\"configpeer.jsp\">configpeer.jsp</a>");
addFormNotice("Peer " + _peer + " banned until restart");
return;
}
addFormError("Invalid peer");
} else if (_action.startsWith("Unshitlist")) {
} else if (_action.startsWith("Unban")) {
Hash h = getHash();
if (h != null) {
if (_context.shitlist().isShitlisted(h)) {
_context.shitlist().unshitlistRouter(h);
addFormNotice("Peer " + _peer + " unshitlisted");
addFormNotice("Peer " + _peer + " unbanned");
} else
addFormNotice("Peer " + _peer + " is not currently shitlisted");
addFormNotice("Peer " + _peer + " is not currently banned");
return;
}
addFormError("Invalid peer");

View File

@ -39,11 +39,11 @@
<h2>Manual Peer Controls</h2>
Router Hash:
<input type="text" size="55" name="peer" value="<%=peer%>" />
<h3>Manually Shitlist / Unshitlist a Router</h3>
<h3>Manually Ban / Unban a Peer</h3>
Shitlisting will prevent the participation of this peer in tunnels you create.
<p>
<input type="submit" name="action" value="Shitlist peer until restart" />
<input type="submit" name="action" value="Unshitlist peer" />
<input type="submit" name="action" value="Ban peer until restart" />
<input type="submit" name="action" value="Unban peer" />
<% if (! "".equals(peer)) { %>
<font color="blue">&lt;---- click to verify action</font>
<% } %>