Raised This Month: $182 Target: $400
 45% 

[ANY] Clientprefs Cleaner (Cookies Purge)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Plugin ID:
3904
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    12 
    Plugin Description:
    Removes old cookies from clientprefs database
    Old 09-14-2013 , 16:52   [ANY] Clientprefs Cleaner (Cookies Purge)
    Reply With Quote #1

    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
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot

    Last edited by Root_; 04-10-2014 at 11:16.
    Root_ is offline
    Oshizu
    Veteran Member
    Join Date: Nov 2012
    Location: Poland() Yume-no-Sekai
    Old 09-14-2013 , 17:34   Re: [ANY] Clientprefs Cleaner (Cookies Purge)
    Reply With Quote #2

    Purge Everything!

    This is gonna be userful stuff
    - Thanks
    __________________
    Hello,
    I'm just a freelance programmer with bunch of experience in Assembly, C++, Lua, Pawn and Sourcepawn... I've got a TF Server Community aswell...


    Currently Accepting Plugin Requests For $$$... Add me!
    - Paid Jobs
    Temporarily Closed
    Oshizu is offline
    404UserNotFound
    ( ͡ ͜ʖ ͡)
    Join Date: Dec 2011
    Location: 🍁
    Old 09-14-2013 , 21:06   Re: [ANY] Clientprefs Cleaner (Cookies Purge)
    Reply With Quote #3

    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.
    __________________
    I'm not a SourcePawn expert, I just play one on TV
    404UserNotFound is offline
    serpentine
    I don't have a problem
    Join Date: Feb 2011
    Location: Madison, WI
    Old 09-14-2013 , 21:55   Re: [ANY] Clientprefs Cleaner (Cookies Purge)
    Reply With Quote #4

    Is there a real advantage to cleaning them out?
    __________________
    serpentine is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: Battlefield 1 fields
    Old 09-15-2013 , 02:35   Re: [ANY] Clientprefs Cleaner (Cookies Purge)
    Reply With Quote #5

    Quote:
    Originally Posted by serpentine View Post
    Is there a real advantage to cleaning them out?
    ...not exactly. Depens plugins, what use clientprefs to store players settings (or else information).
    Bacardi is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 09-15-2013 , 10:46   Re: [ANY] Clientprefs Cleaner (Cookies Purge)
    Reply With Quote #6

    If you maintain your mysql database... Souldnt ever need to clean it.
    Sqlite.. Okay mabye?
    __________________
    Profile - Steam Group - Plugins - Blog - Donate
    Add me on steam if you are seeking sp/map/model commissions.
    friagram is offline
    Dr_Knuckles
    AlliedModders Donor
    Join Date: Mar 2005
    Location: SW Florida
    Old 09-27-2013 , 16:02   Re: [ANY] Clientprefs Cleaner (Cookies Purge)
    Reply With Quote #7

    Doesn't seem to do anything. Its running but it didn't change the size of my prefs file 1 bit.
    __________________
    Dr_Knuckles is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 09-27-2013 , 17:37   Re: [ANY] Clientprefs Cleaner (Cookies Purge)
    Reply With Quote #8

    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
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    StrikerMan780
    AlliedModders Donor
    Join Date: Jul 2009
    Location: Canada
    Old 10-28-2013 , 05:28   Re: [ANY] Clientprefs Cleaner (Cookies Purge)
    Reply With Quote #9

    Quote:
    Originally Posted by Root_ View Post
    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
    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
    __________________

    Last edited by StrikerMan780; 10-28-2013 at 05:37.
    StrikerMan780 is offline
    Send a message via Skype™ to StrikerMan780
    asherkin
    SourceMod Developer
    Join Date: Aug 2009
    Location: OnGameFrame()
    Old 11-13-2013 , 10:05   Re: [ANY] Clientprefs Cleaner (Cookies Purge)
    Reply With Quote #10

    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).
    __________________
    asherkin is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 14:41.


    Powered by vBulletin®
    Copyright ©2000 - 2017, vBulletin Solutions, Inc.
    Theme made by Freecode