Fixing webpw
Dieser Commit ist enthalten in:
Ursprung
2ebcb4d3fc
Commit
6d4130a44a
@ -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;
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
@ -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" +
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren