Updated irc-api snapshot.

fix-message-formatting
Danny van Heumen 12 years ago
parent 20b787a7dc
commit 5f3072c97f

@ -148,13 +148,23 @@ public void connect(String host, int port, String password,
// Make sure we start with an empty joined-channel list. // Make sure we start with an empty joined-channel list.
this.joining.clear(); this.joining.clear();
this.joined.clear(); this.joined.clear();
final IRCServer server;
if (secureConnection)
{
server =
new SecureIRCServer(host, port, password,
getCustomSSLContext(host));
}
else
{
server = new IRCServer(host, port, password, false);
}
this.irc = new IRCApiImpl(true); this.irc = new IRCApiImpl(true);
synchronized (this.irc) synchronized (this.irc)
{ {
this.params.setServer(new IRCServer(host, port, password, this.params.setServer(server);
secureConnection));
this.params.setCustomContext(getCustomSSLContext(host));
this.irc.addListener(new ServerListener()); this.irc.addListener(new ServerListener());
connectSynchronized(); connectSynchronized();
} }
@ -1703,11 +1713,6 @@ private static class ServerParameters
*/ */
private IRCServer server; private IRCServer server;
/**
* Custom SSL Context.
*/
private SSLContext sslContext = null;
/** /**
* Construct ServerParameters instance. * Construct ServerParameters instance.
* @param nickName nick name * @param nickName nick name
@ -1830,30 +1835,6 @@ public void setServer(IRCServer server)
this.server = server; this.server = server;
} }
/**
* Get the SSL Context.
*
* Returns the custom SSLContext or null in case there is no
* custom implementation.
*
* @return returns the SSLContext or null
*/
@Override
public SSLContext getCustomContext()
{
return this.sslContext;
}
/**
* Set custom SSLContext.
*
* @param context the custom SSLContext
*/
public void setCustomContext(SSLContext context)
{
this.sslContext = context;
}
} }
/** /**

Loading…
Cancel
Save