Examples of NapPreferences


Examples of xnap.plugin.nap.util.NapPreferences

    //--- Method(s) ---

    public static void login(Server server, boolean newUser) throws IOException
    {
  Preferences prefs = Preferences.getInstance();
  NapPreferences napPrefs = NapPreferences.getInstance();

  String nick = server.getUsername();
  String password = server.getPassword();
  String email = server.getEmail();
  String info = napPrefs.getClientInfo();
  int linkSpeed = prefs.getLinkType();
 
  if (newUser) {
      server.send(new NewUserLoginMessage(nick, password,
        server.getLocalPort(), info,linkSpeed, email));
View Full Code Here

Examples of xnap.plugin.nap.util.NapPreferences

    {
  if (getMaxUploads() == TRANSFER_UNLIMITED) {
      return true;
  }

  NapPreferences prefs = NapPreferences.getInstance();

  if (prefs.getUseMinimumShares()) {
      if (update() && getFileCount() < prefs.getMinimumShares()) {
    // send message to peer
    if (prefs.getSendMinimumSharesMessage()) {
        PrivateMessage msg = new PrivateMessage
      (getName(), prefs.getMinimumSharesMessage());
        MessageHandler.send(server, msg);
    }
    return false;
      }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.