Well, this was not hard to fix, even though I’'m a java noob See the attached patch (the important one is the OSCARSession.java patch, the other one just uncomments an existing block that I found interesting).
Congratulations to the whole team for the nice build framework, I got it all up and running (including the mod) in minutes!
Cheers,
Filip
P.S. is there no way of attaching a real file to messages in this forum? I had to copy-paste the patch here…
Index: src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/OSCARSession.java
===================================================================
— src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/OSCARSession.java (revision 5915)
+++ src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/OSCARSession.java (working copy)
@@ -29,6 +29,7 @@
import net.kano.joscar.ssiitem.BuddyItem;
import net.kano.joscar.ssiitem.GroupItem;
import org.jivesoftware.util.Log;
+import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.wildfire.gateway.*;
import org.jivesoftware.wildfire.user.UserNotFoundException;
import org.jivesoftware.wildfire.roster.RosterItem;
@@ -79,7 +80,12 @@
public void logIn(PresenceType presenceType, String verboseStatus) {
if (!isLoggedIn()) {
setLoginStatus(TransportLoginStatus.LOGGING_IN);
-
loginConn = new LoginConnection(new ConnDescriptor(
-
JiveGlobals.getProperty(
-
"plugin.gateway.icq.connecthost", "login.oscar.aol.com"),
-
JiveGlobals.getIntProperty(
-
"plugin.gateway.icq.connectport", 5190)),
-
this);
loginConn.connect();
this.presenceType = presenceType;
Index: src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/LoginConnection.java
===================================================================
— src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/LoginConnection.java (revision 5915)
+++ src/java/org/jivesoftware/wildfire/gateway/protocols/oscar/LoginConnection.java (working copy)
@@ -42,14 +42,13 @@
request(new KeyRequest(oscarSession.getRegistration().getUsername()));
}
else if (e.getNewState() == ClientFlapConn.STATE_FAILED) {
-// Message m = new Message();
-// m.setType(Message.Type.error);
-// m.setFrom(this.getMainSession().getTransport().getJID());
-// m.setTo(this.getMainSession().getJIDWithHighestPriority());
-// m.setBody("Connection failed: " + e.getReason());
-// this.getMainSession().getTransport().sendPacket(m);
-// this.getMainSession().logOut();
-
Message m = new Message();
-
m.setType(Message.Type.error);
-
m.setFrom(this.getMainSession().getTransport().getJID());
-
m.setTo(this.getMainSession().getJIDWithHighestPriority());
-
m.setBody("Connection failed: " + e.getReason());
-
this.getMainSession().getTransport().sendPacket(m);
-
this.getMainSession().logOut();
}
else if (e.getNewState() == ClientFlapConn.STATE_NOT_CONNECTED) {
//TODO: Do we need to catch these?