Package xnap.plugin.nap.net

Examples of xnap.plugin.nap.net.Server


  port = Integer.parseInt(t.nextToken());
    }

    public void received()
    {
  Server s = new Server(host, port, getServer().getNetwork());
  Connector.getInstance().addServer(s);
    }
View Full Code Here


        throw new NumberFormatException();
    }

        String network = (t.countTokens() > 0) ? t.nextToken() : "";

        Server s = new Server(ip, port, network);

        if (t.countTokens() >= 3) {
          String token = t.nextToken();
          s.setUsername((token.length() > 0) ? token : null);
          token = t.nextToken();
          s.setPassword((token.length() > 0) ? token : null);
          token = t.nextToken();
          s.setEmail((token.length() > 0) ? token : null);
        }
         
        if (t.countTokens() >= 1) {
          s.setRedirector(t.nextToken().equals("true"));
        }
         
        if (t.countTokens() >= 1) {
          t.nextToken(); //s.setAutoJoinChannels();
        }
View Full Code Here

      }

      // little endian
      int port = readNumber16();
     
      Server s = new Server(ip, port/*, network*/);
     
      if (!username.equals("XXXX")) {
    s.setUsername(username);
    s.setPassword(password);
    s.setEmail(email);
      }
     
      return s;
  }
    }
View Full Code Here

        } else {
          port = DEFAULT_NORMAL_PORT;
        }
      }
     
      Server server = null;
     
      if (address != null && port > 0) {
        server = new Server(address, port);
        if (network != null) {
          server.setNetwork(network);
        }
      } else if (network != null) {
        server = new Server();
        server.setNetwork(network);
      }
     
      if (server != null) {
        if (type != null && type.equals(TYPE_META)) {
          server.setRedirector(true);
        }
        serverList.add(server);
      }
    }
View Full Code Here

TOP

Related Classes of xnap.plugin.nap.net.Server

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.