Page 1 of 1

account deletion.

Posted: Mon Jan 11, 2010 12:59 am
by ojota
People may add in some config time of account deletion.

many thanks

Re: account deletion.

Posted: Mon Jan 11, 2010 7:53 am
by janiii
what do you mean?
- unused accounts with characters?
- unused accounts without characters?
- never logged in
- logged in but without chars

check IdFactory.java for cleaning up the db. you can run the queries from a daemon or other script (php, jython, ...). check forum for suggestions.

Re: account deletion.

Posted: Mon Jan 11, 2010 11:26 am
by ojota
I am happy if this variable may be in a config (int cleanCount = 0;)

http://www.l2jserver.com/trac/browser/t ... a?rev=3799

Thanks

Re: account deletion.

Posted: Mon Jan 11, 2010 11:42 am
by JIV
and what you will config in that? lol. its just counter how much items were cleared.

Re: account deletion.

Posted: Mon Jan 11, 2010 1:02 pm
by ojota
if they can add the variable cleanCount in idfactory.properties configuration file.

Configuration file
http://www.l2jserver.com/trac/browser/t ... s?rev=3799

File where this variable
http://www.l2jserver.com/trac/browser/t ... a?rev=3799

Thanks

Re: account deletion.

Posted: Mon Jan 11, 2010 1:09 pm
by janiii
but what has the variable with a config? nothing. that variable only says at the end of the cleanup how many entries got cleaned up. there is nothing to config on the variable.

you just did not answer my questions..

Re: account deletion.

Posted: Mon Jan 11, 2010 1:13 pm
by ojota
janiii wrote:what do you mean?
- unused accounts with characters?
- unused accounts without characters?
- never logged in
- logged in but without chars

check IdFactory.java for cleaning up the db. you can run the queries from a daemon or other script (php, jython, ...). check forum for suggestions.
It is best that you develop it who know the code and have less chance of error. is very delicate.

the fear that applying a script from a third party, is that it is garbage in the DB

Thanks

Re: account deletion.

Posted: Mon Jan 11, 2010 1:26 pm
by ojota
janiii wrote:but what has the variable with a config? nothing. that variable only says at the end of the cleanup how many entries got cleaned up. there is nothing to config on the variable.

you just did not answer my questions..
http://www.l2jserver.com/trac/browser/t ... a?rev=3799

IdFactory.java File etracion

Code: Select all

                       [b]int cleanCount = 0; [/b]166                         con = L2DatabaseFactory.getInstance().getConnection(); 167                         stmt = con.createStatement(); 168                         // Misc/Account Related 169                         // Please read the descriptions above each before uncommenting them. If you are still 170                         // unsure of what exactly it does, leave it commented out. This is for those who know 171                         // what they are doing. :) 172                          173                         // Deletes only accounts that HAVE been logged into and have no characters associated 174                         // with the account. 175                         // cleanCount += 176                         // stmt.executeUpdate("DELETE FROM accounts WHERE accounts.lastactive > 0 AND accounts.login NOT IN (SELECT account_name FROM characters);"); 177                          178                         // Deletes any accounts that don't have characters. Whether or not the player has ever 179                         // logged into the account. 180                         // cleanCount += 181                         // stmt.executeUpdate("DELETE FROM accounts WHERE accounts.login NOT IN (SELECT account_name FROM characters);"); 182                          183                         // Deletes banned accounts that have not been logged into for xx amount of days 184                         // (specified at the end of the script, default is set to 90 days). This prevents 185                         // accounts from being deleted that were accidentally or temporarily banned. 186                         // cleanCount += 187                         // stmt.executeUpdate("DELETE FROM accounts WHERE accounts.accessLevel < 0 AND DATEDIFF(CURRENT_DATE( ) , FROM_UNIXTIME(`lastactive`/1000)) > 90;"); 188                         // cleanCount += 189                         // stmt.executeUpdate("DELETE FROM characters WHERE characters.account_name NOT IN (SELECT login FROM accounts);"); 190                          191                         // If the chacleanCount = 0racter does not exist...  
add idfactory.properties archival set cleanCount = xx days. when you boot the server and delete the unused accounts.

Thanks

Re: account deletion.

Posted: Mon Jan 11, 2010 1:34 pm
by janiii
ok. still no answer to my question about which accounts would you like to delete (unused, without login, with or without char..).
your programming skills are probably not so high, the cleanCount has nothing to do with what you want. so pls do not make any assumptions what config should be done how. thx. instead try to explain better what you want, if you can't just do things by yourself and want other to make it for you. answering questions when someone ask you something about the issue helps too, mostly ppl do not just ask such questions for fun.

IdFactory is on gameserver and it has no reach to loginserver database until it is in same database. not usable for everyone, could make errors when separated databases. you could only delete accounts from the loginserver database, but then the characters on that accounts would not be deleted and just hang around - that would not free up much space. without database connection from gs to login, you cannot do proper account clean up.

just run your own query for the cleanup, from some external script, according to your needs (everybody's needs are different, also everybody's server setup is different).

Re: account deletion.

Posted: Mon Jan 11, 2010 3:04 pm
by ojota
the goal is to delete accounts / character who are not using more than 45 days. delete accounts if this difficult time, with help erase the character.

and that the valiable int cleanCount = 0 by default, you want to use it puts the number of days.

I'm afraid of making mistakes in delicate and not fully aware of the code.

Thanks

Re: account deletion.

Posted: Mon Jan 11, 2010 3:07 pm
by janiii
cleanCount has nothing to do with days! it is the count of entries that got deleted during the clean up!

check (search) the forum for queries that can clean up unused accounts / characters. mostly recent momo61 wrote about it in some topic. read it.

Re: account deletion.

Posted: Tue Jan 12, 2010 5:55 pm
by ojota
apologizes for misinterpretation of code

thanks