SteamWar/BungeeCore
Archiviert
13
2
Dieser Commit ist enthalten in:
Lixfel 2019-09-08 19:08:53 +02:00
Ursprung 2ebcb4d3fc
Commit 6d4130a44a
3 geänderte Dateien mit 16 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -322,11 +322,11 @@ public class Forge extends BasicListener {
@EventHandler @EventHandler
public void onPluginMessageEvent(PluginMessageEvent e){ public void onPluginMessageEvent(PluginMessageEvent e){
BungeeCore.log(e.getSender().getAddress().getHostString() + " " + e.getTag() + " " + Arrays.toString(e.getData()));
if(!enabled) if(!enabled)
return; return;
BungeeCore.log(e.getSender().getAddress().getHostString() + " " + e.getTag() + " " + Arrays.toString(e.getData()));
if(!e.getTag().equals(FMLHS)) if(!e.getTag().equals(FMLHS))
return; return;

Datei anzeigen

@ -59,6 +59,19 @@ public class SQL {
} }
} }
static void webupdate(String qry) {
try (PreparedStatement st = webcon.prepareStatement(qry)) {
st.executeUpdate();
} catch (SQLException e) {
sqlException();
try (PreparedStatement st = webcon.prepareStatement(qry)) {
st.executeUpdate();
} catch (SQLException ex) {
BungeeCore.log("Could not execute update statement", ex);
}
}
}
static ResultSet select(String qry){ static ResultSet select(String qry){
try{ try{
PreparedStatement st = con.prepareStatement(qry); PreparedStatement st = con.prepareStatement(qry);

Datei anzeigen

@ -96,7 +96,7 @@ public class SteamwarUser {
} }
public void setWebpw(String password){ public void setWebpw(String password){
SQL.update("INSERT INTO User\n" + SQL.webupdate("INSERT INTO User\n" +
" (UID, WebPassword)\n" + " (UID, WebPassword)\n" +
"VALUES\n" + "VALUES\n" +
" (" + id + ", password('"+ SQL.disarmString(password) + "'))\n" + " (" + id + ", password('"+ SQL.disarmString(password) + "'))\n" +