summaryrefslogtreecommitdiffstats
path: root/EssentialsGeoIP
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-01 11:57:57 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-01 11:57:57 +0000
commit013c1d8147c203bf0e76313d6a8d15212e423168 (patch)
treec6b93bc8ad0620ec6d64c8cb9962683680cbabdd /EssentialsGeoIP
parentbc54ba12bf8fb189a98ebf0f348d5d3b8059505c (diff)
downloadEssentials-013c1d8147c203bf0e76313d6a8d15212e423168.tar
Essentials-013c1d8147c203bf0e76313d6a8d15212e423168.tar.gz
Essentials-013c1d8147c203bf0e76313d6a8d15212e423168.tar.lz
Essentials-013c1d8147c203bf0e76313d6a8d15212e423168.tar.xz
Essentials-013c1d8147c203bf0e76313d6a8d15212e423168.zip
[trunk] GeoIP: New permission: essentials.geoip.hide
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1295 e251c2fe-e539-e718-e476-b85c1f46cddb
Diffstat (limited to 'EssentialsGeoIP')
-rw-r--r--EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
index 2d9bd7749..d2b431a6b 100644
--- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
+++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
@@ -41,6 +41,11 @@ public class EssentialsGeoIPPlayerListener extends PlayerListener implements ICo
@Override
public void onPlayerJoin(PlayerJoinEvent event)
{
+ User u = User.get(event.getPlayer());
+ if (u.isAuthorized("essentials.geoip.hide"))
+ {
+ return;
+ }
InetAddress address = event.getPlayer().getAddress().getAddress();
StringBuilder sb = new StringBuilder();
if (config.getBoolean("database.show-cities", false))