remove ipbaninfo
This commit is contained in:
parent
4610d39713
commit
e513d226b6
|
|
@ -1,35 +0,0 @@
|
|||
/*
|
||||
GriefPrevention Server Plugin for Minecraft
|
||||
Copyright (C) 2012 Ryan Hamshire
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.ryanhamshire.GriefPrevention;
|
||||
|
||||
import java.net.InetAddress;
|
||||
|
||||
public class IpBanInfo
|
||||
{
|
||||
InetAddress address;
|
||||
long expirationTimestamp;
|
||||
String bannedAccountName;
|
||||
|
||||
IpBanInfo(InetAddress address, long expirationTimestamp, String bannedAccountName)
|
||||
{
|
||||
this.address = address;
|
||||
this.expirationTimestamp = expirationTimestamp;
|
||||
this.bannedAccountName = bannedAccountName;
|
||||
}
|
||||
}
|
||||
|
|
@ -111,9 +111,6 @@ class PlayerEventHandler implements Listener
|
|||
private final DataStore dataStore;
|
||||
private final GriefPrevention instance;
|
||||
|
||||
//list of temporarily banned ip's
|
||||
private final ArrayList<IpBanInfo> tempBannedIps = new ArrayList<>();
|
||||
|
||||
//number of milliseconds in a day
|
||||
private final long MILLISECONDS_IN_DAY = 1000 * 60 * 60 * 24;
|
||||
|
||||
|
|
@ -419,13 +416,6 @@ class PlayerEventHandler implements Listener
|
|||
isBanned = false;
|
||||
}
|
||||
|
||||
//if banned, add IP to the temporary IP ban list
|
||||
if (isBanned && playerData.ipAddress != null)
|
||||
{
|
||||
long now = Calendar.getInstance().getTimeInMillis();
|
||||
this.tempBannedIps.add(new IpBanInfo(playerData.ipAddress, now + this.MILLISECONDS_IN_DAY, player.getName()));
|
||||
}
|
||||
|
||||
//silence notifications when they're coming too fast
|
||||
if (event.getQuitMessage() != null && this.shouldSilenceNotification())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user