Skip to content

Commit

Permalink
added coowners to the new server thing
Browse files Browse the repository at this point in the history
  • Loading branch information
dries007 committed Oct 14, 2014
1 parent 5651053 commit f14f006
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Expand Up @@ -147,9 +147,10 @@ private static void handleNewServer(HashMap<String, Object> dataObject, IHTTPSes
data.permGen = Integer.parseInt(map.get("PermGen"));
if (data.permGen < 2) throw new Exception("PermGen settings invalid.");

if (map.get("extraJavaParameters").trim().length() == 0) data.extraJavaParameters = Arrays.asList(map.get("extraJavaParameters").trim().split("\n"));
if (map.get("extraMCParameters").trim().length() == 0) data.extraMCParameters = Arrays.asList(map.get("extraMCParameters").trim().split("\n"));
if (map.get("admins").trim().length() == 0) data.admins = Arrays.asList(map.get("admins").trim().split("\n"));
if (map.get("extraJavaParameters").trim().length() != 0) data.extraJavaParameters = Arrays.asList(map.get("extraJavaParameters").trim().split("\n"));
if (map.get("extraMCParameters").trim().length() != 0) data.extraMCParameters = Arrays.asList(map.get("extraMCParameters").trim().split("\n"));
if (map.get("admins").trim().length() != 0) data.admins = Arrays.asList(map.get("admins").trim().split("\n"));
if (map.get("coOwners").trim().length() != 0) data.coOwners = Arrays.asList(map.get("coOwners").trim().split("\n"));

data.jarName = map.get("jarname");
data.rconPswd = map.get("rconpass");
Expand Down
8 changes: 8 additions & 0 deletions src/main/resources/templates/newserver.ftl
Expand Up @@ -119,6 +119,14 @@
<span class="help-block">Don't include yourself... One per line!</span>
</div>
</div>
<div class="form-group">
<label for="coOwners" class="col-sm-2 control-label">Co Owners</label>

<div class="col-sm-10">
<textarea class="form-control" rows="3" id="coOwners" name="coOwners"></textarea>
<span class="help-block">Don't include yourself... One per line!</span>
</div>
</div>
<div class="form-group">
<label for="autostart" class="col-sm-2 control-label"></label>

Expand Down

0 comments on commit f14f006

Please sign in to comment.