String nick = Preferences.getString("autoloadgroupchat", "nick", "");
if(nick.equals("")) nick = backend.getMyJID().getUser() + "-" + Locale.getDefault().getCountry();
//System.out.println(nick);
final JID jid = new JID(Preferences.getString("autoloadgroupchat", "room", "room"),Preferences.getString("autoloadgroupchat", "server", "groupchatserver"),nick);
nu.fw.jeti.plugins.groupchat.Plugin.startGroupchat(jid,backend);
Avatars avatars = null;
if(PluginsInfo.isPluginLoaded("ichatavatars"))
{
avatars = (Avatars)PluginsInfo.getPluginInstance("ichatavatars");
}
if(avatars!=null)
{
final Avatars avatar = avatars;
Timer t = new Timer();
t.schedule(new TimerTask() {
public void run() {
int status =Presence.AVAILABLE;
String message=null;
if (Preferences.getBoolean("jeti", "statusLinked", false)) {
status = StatusButton.getStatus();
message = StatusButton.getStatusMessage();
}
Presence presence=null;
presence = avatar.addHash(jid,status,message,new XMUC());
backend.send(presence);
}
},60000);
}