Ban/Unban command fix

Bug detected by vcoc. Solution requires update at SQL tables "macbans"
and "ipbans".
This commit is contained in:
ronancpl
2017-04-27 08:42:06 -03:00
parent f5fbb038e9
commit fa37673913
12 changed files with 99 additions and 140 deletions

View File

@@ -366,7 +366,7 @@ public class MapleClient {
filtered.add(rs.getString("filter"));
}
}
try (PreparedStatement ps = con.prepareStatement("INSERT INTO macbans (mac) VALUES (?)")) {
try (PreparedStatement ps = con.prepareStatement("INSERT INTO macbans (mac, aid) VALUES (?, ?)")) {
for (String mac : macs) {
boolean matched = false;
for (String filter : filtered) {
@@ -377,6 +377,7 @@ public class MapleClient {
}
if (!matched) {
ps.setString(1, mac);
ps.setString(2, String.valueOf(getAccID()));
ps.executeUpdate();
}
}