aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java44
1 files changed, 17 insertions, 27 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java b/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java
index 22bccff..4fea981 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/ProtocolProviderServiceIrcImpl.java
@@ -152,14 +152,16 @@ public class ProtocolProviderServiceIrcImpl
public void register(SecurityAuthority authority)
throws OperationFailedException
{
- Map accountProperties = getAccountID().getAccountProperties();
-
- String serverAddress = (String) accountProperties
- .get(ProtocolProviderFactory.SERVER_ADDRESS);
-
- String serverPort = (String) accountProperties
- .get(ProtocolProviderFactory.SERVER_PORT);
-
+ AccountID accountID = getAccountID();
+
+ String serverAddress =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_ADDRESS);
+
+ String serverPort =
+ accountID
+ .getAccountPropertyString(ProtocolProviderFactory.SERVER_PORT);
+
if(serverPort == null || serverPort.equals(""))
{
serverPort = "6667";
@@ -169,25 +171,13 @@ public class ProtocolProviderServiceIrcImpl
String serverPassword = IrcActivator.
getProtocolProviderFactory().loadPassword(getAccountID());
- boolean autoNickChange = true;
-
- boolean passwordRequired = true;
-
- if(accountProperties
- .get(ProtocolProviderFactory.AUTO_CHANGE_USER_NAME) != null)
- {
- autoNickChange = new Boolean((String)accountProperties
- .get(ProtocolProviderFactory.AUTO_CHANGE_USER_NAME))
- .booleanValue();
- }
-
- if(accountProperties
- .get(ProtocolProviderFactory.NO_PASSWORD_REQUIRED) != null)
- {
- passwordRequired = new Boolean((String) accountProperties
- .get(ProtocolProviderFactory.NO_PASSWORD_REQUIRED))
- .booleanValue();
- }
+ boolean autoNickChange =
+ accountID.getAccountPropertyBoolean(
+ ProtocolProviderFactory.AUTO_CHANGE_USER_NAME, true);
+
+ boolean passwordRequired =
+ accountID.getAccountPropertyBoolean(
+ ProtocolProviderFactory.NO_PASSWORD_REQUIRED, true);
//if we don't - retrieve it from the user through the security authority
if (serverPassword == null && passwordRequired)