From eaf99cf4a6da4e4c606ebc9a2ea123f8227a552d Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 17:11:44 +1000 Subject: [PATCH] Yo dawg. Lets start populating the seen row --- .../java/net/md_5/bungee/reconnect/SQLReconnectHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/reconnect/SQLReconnectHandler.java b/proxy/src/main/java/net/md_5/bungee/reconnect/SQLReconnectHandler.java index f362b044..da4b5304 100644 --- a/proxy/src/main/java/net/md_5/bungee/reconnect/SQLReconnectHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/reconnect/SQLReconnectHandler.java @@ -63,10 +63,11 @@ public class SQLReconnectHandler extends AbstractReconnectManager public void setServer(ProxiedPlayer player) { - try ( PreparedStatement ps = connection.prepareStatement( "UPDATE players SET server = ? WHERE username = ?" ) ) + try ( PreparedStatement ps = connection.prepareStatement( "UPDATE players SET server = ?, seen = ? WHERE username = ?" ) ) { ps.setString( 1, player.getServer().getInfo().getName() ); - ps.setString( 2, player.getName() ); + ps.setInt( 2, (int) ( System.currentTimeMillis() / 1000L ) ); + ps.setString( 3, player.getName() ); ps.executeUpdate(); } catch ( SQLException ex ) {