Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean doLogin(String command, PrintStream out) throws Exception {
- String[] args = splitCommand(command);
- String UserName = args[0];
- String PassWord = calcHash(args[1]);
- String Address = args[2];
- for (User user : Server.getUsers()) {
- if (user.getUserName().equals(UserName))
- if (user.getPassWord().equals(PassWord)) {
- if (user.getAddress().equalsIgnoreCase("Unkown")) {
- user.setAddress(Address);
- out.println("New Profile activated.");
- }
- if (user.getAddress().equals(Address)) {
- for (IPBan ban : Server.getIPBans()) {
- if (ban.matchesAddress(Address)) {
- out.println("You are currently banned. Time remaining : " + ban.getTime());
- return false;
- }
- }
- return true;
- }
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement