return false;
}
}
}
protected void logPresence(PresenceWrapper oldWrapper) {
DBConnection db = this.db.getDBConnection(false);
int id = db.sendInsert(null,"goim_presence_log","jid,resource,mode,start,\"end\"",
StringUtils.parseBareAddress(oldWrapper.presence.getFrom()).toLowerCase(),
StringUtils.parseResource(oldWrapper.presence.getFrom()),
oldWrapper.presence.getMode().toString(),
oldWrapper.date,
new Date());
db.commit();
Iterator i = oldWrapper.presence.getExtensions();
while(i.hasNext()) {
PacketExtension ex = (PacketExtension)i.next();
if(ex instanceof GameStatusExtension) {
GameStatusExtension status = (GameStatusExtension)ex;
String gameId = status.gameId;
String destination;
if(status.gameId.equals("lfss2")) {
destination = status.atts.get("servername");
} else {
destination = GameStatusExtension.formatSocketAddress(status.target);
}
db.sendInsert(null,"goim_server","game,destination,presence",gameId,destination,id);
db.commit();
}
}
db.close();
}