mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 09:19:22 +02:00

* added option to change character name in accountmanagement * added automatic database updater (data migrations) * renamed events to hooks * moved hooks to database * now you can use hooks in plugins * set account.type field to 5, if TFS 1.0+ * added example plugin * new, latest google analytics code * fixed bug with loading account.name that has numbers in it * fixed many bugs in player editor in admin panel * added error handling to plugin manager and some more verification in file has been correctly unpacked/uploaded * fixed Statistics page in admin panel when using account.number * fixed bug when creating/recovering account on servers with account.salt field (TFS 0.3 for example) * fixed forum showing thread with html tags (added from news manager) * new, actual code for youtube videos in movies * fixed showing vocation images when using $config['online_vocations_images'] * many fixes in polls (also importing proper schema) * fixed hovering on buttons in kathrine template (on accountmanagement page) * many fixes in signatures * added missing gesior signature system
39 lines
778 B
JavaScript
39 lines
778 B
JavaScript
eventId = 0;
|
|
lastSend = 0;
|
|
|
|
function checkName()
|
|
{
|
|
if(eventId != 0)
|
|
{
|
|
clearInterval(eventId)
|
|
eventId = 0;
|
|
}
|
|
|
|
if(document.getElementById("newcharname").value=="")
|
|
{
|
|
document.getElementById("name_check").innerHTML = '<b><font color="red">Please enter new character name.</font></b>';
|
|
return;
|
|
}
|
|
|
|
//anti flood
|
|
var date = new Date;
|
|
var timeNow = parseInt(date.getTime());
|
|
|
|
if(lastSend != 0)
|
|
{
|
|
if(timeNow - lastSend < 1100)
|
|
{
|
|
eventId = setInterval('checkName()', 1100)
|
|
return;
|
|
}
|
|
}
|
|
|
|
var newcharname = document.getElementById("newcharname").value;
|
|
$.get("tools/validate.php", { name: newcharname, uid: Math.random() },
|
|
function(data){
|
|
document.getElementById("name_check").innerHTML = data;
|
|
lastSend = timeNow;
|
|
});
|
|
|
|
lastSend = timeNow;
|
|
} |