changeStatus(type,mode,true);
roster = conn.getRoster();
roster.addRosterListener(new RosterListener(){
public void rosterModified() {
// System.out.println("rosterModified()");
rosterListener.fireEvent(new GOIMRosterEvent(XMPPManager.this,GOIMRosterEvent.TYPE_MODIFIED,null));
}
public void presenceChanged(String jid) {
// System.out.println("Presence Changed: " + jid);
rosterListener.fireEvent(new GOIMRosterEvent(XMPPManager.this,GOIMRosterEvent.TYPE_PRESENCE_CHANGED,jid));
}
// TODO Find a better solution for this .. maybe forward all of the three events !
// (Since smack 2.1 the rosterModified() method is split up in the following three methods)
public void entriesAdded(Collection arg0) {
rosterModified();
}
public void entriesUpdated(Collection arg0) {
rosterModified();
}
public void entriesDeleted(Collection arg0) {
rosterModified();
}});
rosterListener.fireEvent(new GOIMRosterEvent(XMPPManager.this,GOIMRosterEvent.TYPE_MODIFIED,null));
GOIMPlugin.gameStatusChanged.addListener(new SpheneListener<GameStatusChangeEvent>() {
public void handleEvent(GameStatusChangeEvent event) {
changeStatus(lastPresenceSent.getType(),lastPresenceSent.getMode(),false);
}
});