Filter duplicate IPs and shit in superadmin list.

This commit is contained in:
Steven Lawson
2012-11-20 20:29:57 -05:00
parent 8076ee822e
commit 892682e969
3 changed files with 16 additions and 3 deletions

View File

@ -912,6 +912,15 @@ public class TFM_Util
{
return restricted_senders.contains(sender_name.toLowerCase());
}
public static List<String> removeDuplicates(List<String> list)
{
HashSet<String> hash = new HashSet<String>();
hash.addAll(list);
list.clear();
list.addAll(hash);
return list;
}
// I wrote all this before i discovered getTargetBlock >.> - might come in handy some day...
// public static final double LOOKAT_VIEW_HEIGHT = 1.65;
// public static final double LOOKAT_STEP_DISTANCE = 0.2;