+ handler = function(password){
+ // check if settings have changed, reinitialize jappix mini if this is the case
+ settings_identifier = str_sha1(server);
+ settings_identifier += str_sha1(username);
+ settings_identifier += str_sha1(bosh);
+ settings_identifier += str_sha1(password);
+ settings_identifier += str_sha1(nickname);
+
+ saved_identifier = getDB("jappix-mini", "settings_identifier");
+ if (saved_identifier != settings_identifier) removeDB('jappix-mini', 'dom');
+ setDB("jappix-mini", "settings_identifier", settings_identifier);
+
+ // set bosh host
+ if (bosh)
+ HOST_BOSH = HOST_BOSH+"?host_bosh="+encodeURI(bosh);
+
+ // start jappix mini
+ MINI_NICKNAME = nickname;
+ launchMini(true, false, server, username, password);
+ }
+
+ // decrypt password if necessary