completed switch to UDP featuring ingame chat support again

This commit is contained in:
jenzur
2020-07-03 22:50:21 +02:00
parent 91bb936ebb
commit 4cc380a1ff
3 changed files with 30 additions and 44 deletions
@@ -105,34 +105,6 @@ public class DataMapper {
return hlStatsMessages;
}
public static String check_autismo_mysql() {
String target = "";
try (Connection l_cCon = DBCPDataSourceAutismo.getConnection()) {
String l_sSQL = "SELECT chatmessage FROM unloze_css_autism_bot.chatting c WHERE c.responsemessage = '' LIMIT 1";
try (PreparedStatement l_pStatement = l_cCon.prepareStatement(l_sSQL)) {
try (ResultSet l_rsSearch = l_pStatement.executeQuery()) {
while (l_rsSearch.next()) {
target = l_rsSearch.getString(1);
}
}
}
} catch (SQLException ex) {
Logger.getLogger(DataMapper.class.getName()).log(Level.SEVERE, null, ex);
}
return target;
}
public static void update_autismo_mysql(String responseMsg, String update_string) {
try (Connection l_cCon = DBCPDataSourceAutismo.getConnection()) {
String l_sSQL = "UPDATE unloze_css_autism_bot.`chatting` SET `responsemessage` = '" + responseMsg + "' WHERE `chatmessage` = '" + update_string + "'";
try (PreparedStatement l_pStatement = l_cCon.prepareStatement(l_sSQL)) {
l_pStatement.execute();
}
} catch (SQLException ex) {
Logger.getLogger(DataMapper.class.getName()).log(Level.SEVERE, null, ex);
}
}
public static void CloseConnections(PreparedStatement ps, ResultSet rs, Connection con) {
if (rs != null) {
try {