account deletion.

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
ojota
Posts: 26
Joined: Wed May 13, 2009 9:25 pm

account deletion.

Post by ojota »

People may add in some config time of account deletion.

many thanks
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: account deletion.

Post 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.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
ojota
Posts: 26
Joined: Wed May 13, 2009 9:25 pm

Re: account deletion.

Post 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
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: account deletion.

Post by JIV »

and what you will config in that? lol. its just counter how much items were cleared.
ojota
Posts: 26
Joined: Wed May 13, 2009 9:25 pm

Re: account deletion.

Post 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
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: account deletion.

Post 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..
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
ojota
Posts: 26
Joined: Wed May 13, 2009 9:25 pm

Re: account deletion.

Post 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
ojota
Posts: 26
Joined: Wed May 13, 2009 9:25 pm

Re: account deletion.

Post 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
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: account deletion.

Post 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).
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
ojota
Posts: 26
Joined: Wed May 13, 2009 9:25 pm

Re: account deletion.

Post 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
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: account deletion.

Post 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.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
ojota
Posts: 26
Joined: Wed May 13, 2009 9:25 pm

Re: account deletion.

Post by ojota »

apologizes for misinterpretation of code

thanks
Post Reply