Fixing webpw
Dieser Commit ist enthalten in:
Ursprung
2ebcb4d3fc
Commit
6d4130a44a
@ -322,11 +322,11 @@ public class Forge extends BasicListener {
|
||||
|
||||
@EventHandler
|
||||
public void onPluginMessageEvent(PluginMessageEvent e){
|
||||
BungeeCore.log(e.getSender().getAddress().getHostString() + " " + e.getTag() + " " + Arrays.toString(e.getData()));
|
||||
|
||||
if(!enabled)
|
||||
return;
|
||||
|
||||
BungeeCore.log(e.getSender().getAddress().getHostString() + " " + e.getTag() + " " + Arrays.toString(e.getData()));
|
||||
|
||||
if(!e.getTag().equals(FMLHS))
|
||||
return;
|
||||
|
||||
|
@ -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){
|
||||
try{
|
||||
PreparedStatement st = con.prepareStatement(qry);
|
||||
|
@ -96,7 +96,7 @@ public class SteamwarUser {
|
||||
}
|
||||
|
||||
public void setWebpw(String password){
|
||||
SQL.update("INSERT INTO User\n" +
|
||||
SQL.webupdate("INSERT INTO User\n" +
|
||||
" (UID, WebPassword)\n" +
|
||||
"VALUES\n" +
|
||||
" (" + id + ", password('"+ SQL.disarmString(password) + "'))\n" +
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren