public class UserList
{
private static final Hashtable<String, Integer> ipList = new Hashtable<String, Integer>();
-
+
public static User[] findUsersByHost(String ip)
{
if (ip == null || ip.equalsIgnoreCase(""))
return null;
}
-
+
public static User locateNick(String nick)
{
for (Iterator<String> it = User.getUsers().iterator(); it.hasNext();)
x.clearFlood();
}
}
-
+
public static String globToRegex(String glob)
{
StringBuilder regex = new StringBuilder("^");
}
return regex.append("$").toString();
}
-
+
public static void increaseHost(final String ip)
{
Integer hosts = ipList.get(ip);
else
ipList.put(ip, hosts + 1);
}
-
+
public static void decreaseHost(final String ip)
{
int hosts = ipList.get(ip);
else
ipList.put(ip, hosts - 1);
}
-
+
public static int getUserCountForIP(final String ip)
{
Integer hosts = ipList.get(ip);