rendered paste bodypackage net.sf.l2j.gameserver.model;import java.sql.PreparedStatement;import java.util.logging.Level;import java.util.logging.Logger;import net.sf.l2j.Config;import net.sf.l2j.L2DatabaseFactory;public class GMAudit {private static final Logger _log = Logger.getLogger(GMAudit.class.getName());public static void auditGMAction(String gmName, String action, String target, String params){ if (Config.GMAUDIT) { java.sql.Connection con = null; PreparedStatement statement = null; try { con = L2DatabaseFactory.getInstance().getConnection(); statement = con.prepareStatement( "INSERT INTO GM_AUDIT(GM, ACCION, TARGET, PARAM, FECHA) VALUES(?,?,?,?,now())"); statement.setString(1, gmName); statement.setString(2, action); statement.setString(3, target); statement.setString(4, params); statement.executeUpdate(); } catch (Exception e) { _log.log(Level.SEVERE, "No se ha podido supervisar la accion de un GM:", e); } finally { try { statement.close(); con.close(); } catch (Exception e) {} }}}}