summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2009-08-09Multi::IRC: Got rid of crash in the throttle functionYorhel1-1/+1
2009-08-09Multi::IRC: Fix double-notify bugYorhel1-0/+1
timestamptz data types have sub-second precision, but we use time() with second precision for comparing, resulting in false positives. Using Time::HiRes::time should give the same precision as PostgreSQL's NOW(), so things should be working fine now. It's still a bad idea to use Multi's time instead of a PostgreSQL value for comparing... should really think of a clean way of fixing this.
2009-08-09Don't check for double post when editing a postYorhel1-1/+1
There's no need to disallow someone to edit their post within 30 seconds after posting...
2009-08-09Multi::IRC: Fixed authentication level checking bugYorhel1-3/+4
Everyone had access to the commands with the |8 flag enabled. Oops!
2009-08-09Multi::Maintenance: Added logging of important statisticsYorhel1-8/+11
Requires the new PoCo-Pg
2009-08-09Multi::Core: Actually log to file instead of stdoutYorhel1-1/+1
2009-08-09Converted changes.added to timestamptzYorhel6-17/+19
That was the last one. I hope I haven't forgotten to update anything.
2009-08-08Don't show hidden VN items on g+ pagesYorhel1-0/+1
Ideally, all tag relations should be removed when hiding a VN, but that would make hiding a destructive action, while currently it can still be reverted easilily.
2009-08-08Converted tags.added to timestamptzYorhel2-3/+4
2009-08-08Converted users.registered to timestamptzYorhel1-5/+5
Just a few more to go...
2009-08-08Converted votes.date to timestamptz and use NOW() as defaultYorhel1-3/+3
2009-08-08Converted threads_posts.date and edited to timestamptzYorhel2-6/+6
Everything still seems to be working fine so far.
2009-08-08Converted wlists.added and rlists.added to timestamptzYorhel1-1/+1
I like how the rlists.added column isn't used anywhere in the code, makes the conversion a lot easier. :-)
2009-08-08Improved handling of the timestamp columns in anime and session tablesYorhel3-9/+4
Anything fetched from the DB to Perl should be converted to a UNIX timestamp, and everything that goes from Perl to the DB should be converted from a UNIX timestamp to a timestamptz data type. Also, when creating a session, don't rely on the fact that the expiration default happens to be the same as the cookie expiration time calculated in Perl. It's cleaner to calculate the date at one place and then use that everywhere else.
2009-08-08Added note on g+ pages about cachingYorhel1-0/+1
Ideally, that shouldn't be necessary, but I can't think of a way to keep the tags_vn_bayesian table up-to-date without a huge performance penalty.
2009-08-08Removed last traces of the category systemYorhel3-70/+8
2009-08-08Merge branch '3dev' of git://3decibels.net/vndb into betaYorhel3-1/+8
+ ChangeLog update
2009-08-06More logical naming of dbGetPost date filter3dB2-4/+4
2009-08-06Post checking now alows one new thread in 30s3dB1-1/+1
2009-08-06Added OpenSearch plugin + autodetectionYorhel2-1/+22
2009-08-05Removed unnecessary export.3dB1-1/+1
-- Removed unneeded export of previously deleted subroutine dbPostCheckDouble
2009-08-05Reworked double post checking to use existing code3dB2-22/+5
-- Removed dbPostCheckDouble -- Added more filters to dbPostGet to serve similar purpose
2009-08-05Multi::Core: Got rid of 'undefined' warning in pg_error + ChangeLog updateYorhel1-1/+1
2009-08-05Multi::IRC: Added !p producer search and fixed tiny bug in !vnYorhel1-5/+31
2009-08-05Removed last traces of the shared memory processing queueYorhel6-44/+0
Everything has now finally been converted to use the PgSQL LISTEN/NOTIFY feature. This commit removes the last Tie::ShareLite dependency.
2009-08-05Multi::IRC: Reimplemented notifications using PgSQL LISTEN/NOTIFYYorhel1-22/+66
2009-08-05Multi::IRC: Spam random quotes in idle channelsYorhel1-1/+15
'idle' is currently defined as 60+rand(300) minutes, so it'll only occur in *very* idle channels... might be an idea to lower these numbers later on.
2009-08-05Multi::IRC: Wrote generic throttle function and put a limit on !vn usageYorhel1-12/+40
2009-08-05Multi::IRC: Added !quote command to reply with a random quote from the DBYorhel1-2/+13
2009-08-05Multi::IRC: Re-added the !vn commandYorhel1-36/+36
Works as it did before. But maybe it's time to add a small throttle to prevent misuse?
2009-08-05Multi::IRC: Don't listen to unaddressed commands without the ! triggerYorhel1-2/+2
Tiny bug introduced in a recent commit.
2009-08-05Multi::IRC: Allow commands to be called by addressing the botYorhel1-10/+13
And force this for some commands. Calling !die in a channel with multiple bots isn't a good idea, after all...
2009-08-05Multi::IRC: Display edit summary on edit linksYorhel1-3/+9
2009-08-05Multi::IRC: Display board titles in thread linkingYorhel1-2/+19
Nothing beats seeing a: <Multi> [t2.7] Reply to Alias: added Japanese title Posted in db, u:retardsrox, u:nacchi, v:Natsu, Semi, Shoujo, v:Dal-eu Jajang-ga By applehq @ http://beta.vndb.org/t2.7
2009-08-04Started on Multi::IRC rewriteYorhel1-254/+246
Most of the functionality of the old IRC bot should be present again, with notifications and the !vn command being the only exceptions. I'll reimplement those later. The configuration has changed a little: - 'user' variable renamed to 'nick' - 'channel' renamed to 'channels' (it's an arrayref, after all) - the 'masters' variable now uses IRC masks rather than nicks This new version also has three user levels rather than two: regular users, OPs in the first channel, and 'masters'. This way #vndb OPs can get control over some useful functions as well. The 'master' functions are far too powerful and as such should only be used by the person operating the bot.
2009-08-04Implemented double-post prevention3dB3-1/+25
-- Created a subroutine to check for any recent posts made by a user -- Added double-post checking and error messages to the form handler & html generator
2009-08-01Don't try to DELETE FROM vnlists in dbUserDel()Yorhel1-1/+0
The vnlists table has been removed in an earlier update. Though I don't think I've explicitely removed it from an update script. For those who still have this table, check commit 9a07126464f4ca05f33e7375883ada66abe7dcf4 - it has some changes not present in any of the update scripts but which are done on the main (vndb.org & beta) databases.
2009-07-31Use bytea data type to store session tokensYorhel1-10/+8
To be consistent with users.passwd - hashes are stored in binary. All conversion from/to hex is done in the DB layer.
2009-07-31Fetch hex hashes from dbUserGet() and do comparison in hexYorhel2-12/+9
For consistency, it's best to do everything related to hashes in hexadecimal notation in Perl.
2009-07-31Added encode_utf8() on $salt and $pass in _authEncryptPass()Yorhel1-3/+5
This forces $salt and $pass to be 'downgraded' to byte strings in case we are given unicode strings (i.e. when fetched from database or YAWF). This, in turn, prevents global_salt from 'upgrading', which allows binary data to be used for this string.
2009-07-30Util::Auth: check cookie for sanity and delete incorrect cookiesYorhel1-5/+14
This fixes a 500 error when the cookie was longer than 40 bytes but the characters after the 40th byte aren't a number. (i.e. the cookies of the previous auth system) This will also purge the cookie from the user's browser when dbSessionCheck() returns false. (There's no sense in keeping it in such a case)
2009-07-30Merge branch 'auth' of git://3decibels.net/vndb into betaYorhel3-32/+115
Conflicts: util/dump.sql util/updates/update_2.6.sql Also updated ChangeLog and made some tiny style changes.
2009-07-29Changed sessions.expiration column to timestamp3dB2-4/+11
-- Updated SQL files to reflect column type change. -- Subroutine dbSessionAdd rewritten to accept an expiration timestap as an optional third argument.
2009-07-29Altered the way sessions are handled in some cases3dB2-0/+2
-- Deleting a user now deletes all sessions too. -- Changing a user password now deletes all stored sessions for that user.
2009-07-29Cleanup of Util/Auth.pm3dB1-13/+7
2009-07-29Rewrote Multi::MaintenanceYorhel1-99/+99
Everything now uses Async SQL access, and doesn't rely on POE::Component::Cron anymore. I removed a few maintenance functions that weren't needed. Warning for unkanime is already done by Multi::Anime, and integrity checking should really be done in PgSQL. The tag<->vn cache is now also regenerated daily rather than hourly.
2009-07-28Rewrote cookie experation string generation to use POSIX::strftime3dB1-5/+3
2009-07-28Removed Crypt::Lite dependency3dB1-11/+8
-- Changed the way cookie data is handled and removed the need for Crypt::Lite -- Removed "cookie_key" configuration setting for Crypt::Lite
2009-07-28Multiple bugfixes to authorization system & sql tweaks3dB2-12/+13
This commit is tested to work.
2009-07-28Modified DB libraries and user handlers dealing with passwords to work with ↵3dB2-8/+10
new auth system. -- Modified all database insertion and edit subroutines to be able to work with the new 'salt' column. -- Modified all subroutines dealing with password manipulation to use authPreparePass to encrypt passwords and generate salts.