Package xnap.util

Examples of xnap.util.Preferences


  message = t.allNextTokens();
    }

    public void received()
    {
  Preferences prefs = Preferences.getInstance();
 
  if (!message.trim().equals("//WantQueue")) {
      User user = server.getUser(nick);
      if (user.isChatIgnored()) {
      if (prefs.getSendChatIgnoreMessage()) {
        xnap.plugin.nap.net.msg.client.PrivateMessage msg
      = new xnap.plugin.nap.net.msg.client.PrivateMessage
          (nick, prefs.getChatIgnoreMessage());
          MessageHandler.send(server, msg);
      }
      }
      else {
    PrivateChannel pc
View Full Code Here


   
    //--- 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

  return true;
    }

    public boolean isAllowedToRequestDownload()
    {
  Preferences prefs = Preferences.getInstance();

  if (prefs.getLimitDownloadsPerUser()) {
      if (getMaxDownloads() == IUser.TRANSFER_NEVER) {
    return false;
      }
      else if (getMaxDownloads() == IUser.TRANSFER_DEFAULT) {
    return (getLocalDownloadCount() + getQueuedCount()
      < prefs.getMaxDownloadsPerUser())
      || (prefs.getMaxDownloadsPerUser() == 0);
      }
  }
 
  return true;
    }
View Full Code Here

TOP

Related Classes of xnap.util.Preferences

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.