AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Clientprefs Cleaner (Cookies Purge) (https://forums.alliedmods.net/showthread.php?t=226193)

Root_ 09-14-2013 16:52

[ANY] Clientprefs Cleaner (Cookies Purge)
 
I believe it was requested for several times, so I decided to realize that for everyone because I am also interested in that.

This is simple as its called - plugin purges clientprefs database by removing player 'cookies', which has not been updated for long time.
It also refreshes cookies timestamp every time player connects, so cookies will not be removed accidentally (at least after once it purged).

There's only one ConVar: sm_cookies_removedays - Removes cookies which hasn't been updated for X days.
By default it removes cookies after 30 days of player inactivity.

Also don't forget to save current clientprefs database if you really care about cookies. :)

Servers with this plugin

Download plugin
Browse source code

Oshizu 09-14-2013 17:34

Re: [ANY] Clientprefs Cleaner (Cookies Purge)
 
Purge Everything!

This is gonna be userful stuff
- Thanks

404UserNotFound 09-14-2013 21:06

Re: [ANY] Clientprefs Cleaner (Cookies Purge)
 
Thank god. I fucked up my clientprefs file trying to wipe it with Notepad++. Had to replace it with a fresh copy. This will be very useful to me in the future.

serpentine 09-14-2013 21:55

Re: [ANY] Clientprefs Cleaner (Cookies Purge)
 
Is there a real advantage to cleaning them out?

Bacardi 09-15-2013 02:35

Re: [ANY] Clientprefs Cleaner (Cookies Purge)
 
Quote:

Originally Posted by serpentine (Post 2034852)
Is there a real advantage to cleaning them out?

...not exactly. Depens plugins, what use clientprefs to store players settings (or else information).

friagram 09-15-2013 10:46

Re: [ANY] Clientprefs Cleaner (Cookies Purge)
 
If you maintain your mysql database... Souldnt ever need to clean it.
Sqlite.. Okay mabye?

Dr_Knuckles 09-27-2013 16:02

Re: [ANY] Clientprefs Cleaner (Cookies Purge)
 
Doesn't seem to do anything. Its running but it didn't change the size of my prefs file 1 bit.

Root_ 09-27-2013 17:37

Re: [ANY] Clientprefs Cleaner (Cookies Purge)
 
It's actually purging database, you can look at this through SQLite Database Browser.
I have no idea why its dont change size of clientprefs database, but does it makes sense? It's only a few kilobytes :P

StrikerMan780 10-28-2013 05:28

Re: [ANY] Clientprefs Cleaner (Cookies Purge)
 
Quote:

Originally Posted by Root_ (Post 2041695)
It's actually purging database, you can look at this through SQLite Database Browser.
I have no idea why its dont change size of clientprefs database, but does it makes sense? It's only a few kilobytes :P

That could be a problem, I have a very active MvM server that's open to the public/matchmaking, and the clientprefs-sqlite.sq3 has easily grown to over 18mb. Perhaps executing the VACUUM command in a query would be a good idea when purging. http://www.sqlite.org/lang_vacuum.html

asherkin 11-13-2013 10:05

Re: [ANY] Clientprefs Cleaner (Cookies Purge)
 
SQLite isn't designed to have multiple connections open to a file, this could easily corrupt the database (and I'm surprised it doesn't error anyway).


All times are GMT -4. The time now is 09:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.