Archiviert
1
0
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-08-25 19:23:30 +02:00
Ursprung bca534473e
Commit 30e4055e96

Datei anzeigen

@ -15,17 +15,17 @@ public class IgnoreSystem{
public static boolean isIgnored(SteamwarUser ignorer, SteamwarUser ignored) {
try {
return !SQL.select("SELECT * FROM Ignore WHERE Ignorer = ? AND Ignored = ?", ignorer.getId(), ignored.getId()).next();
return !SQL.select("SELECT * FROM IgnoredPlayers WHERE Ignorer = ? AND Ignored = ?", ignorer.getId(), ignored.getId()).next();
} catch (SQLException e) {
throw new SecurityException("Could not check if ignored", e);
}
}
public static void ignore(SteamwarUser ignorer, SteamwarUser ignored) {
SQL.update("INSERT INTO Ignore (Ignorer, Ignored) VALUES (?, ?)", ignorer.getId(), ignored.getId());
SQL.update("INSERT INTO IgnoredPlayers (Ignorer, Ignored) VALUES (?, ?)", ignorer.getId(), ignored.getId());
}
public static void unIgnore(SteamwarUser ignorer, SteamwarUser ignored) {
SQL.update("DELETE FROM Ignore WHERE Ignorer = ? AND Ignored = ?", ignorer.getId(), ignored.getId());
SQL.update("DELETE FROM IgnoredPlayers WHERE Ignorer = ? AND Ignored = ?", ignorer.getId(), ignored.getId());
}
}