summaryrefslogtreecommitdiff
path: root/lib/Multi
AgeCommit message (Collapse)AuthorFilesLines
2016-06-19API: Add "tags" filter to "get vn" + increase throttle throttleYorhel1-4/+8
2016-06-12API: Increase some limits + set custom TCP keepalive valuesYorhel1-3/+15
2016-05-15API: Allow sorting 'get vn' on stats fieldsYorhel1-1/+4
2016-04-11API: Added "vns" flag and member to "get character"Yorhel1-0/+9
2016-01-29Multi::API: added 'screens' flag to 'get vn'Yorhel1-0/+18
2016-01-17Use Tie::IxHash for some global.pl listsYorhel1-6/+6
This removes the reliance on sort() to provide meaningful ordering (the keys aren't always good for ordering) and removes the 'order' hack used for (vn|prod)_relations.
2016-01-17L10N: Intern VN/producer relations + update relation graphsYorhel1-10/+13
Now that graphviz knows the actual strings, it has a better opportunity to create better graphs. (Most of them still look messy tho)
2016-01-16L10N: Intern languages/platforms/resolutions/media/ptype/rtype/vnlengthYorhel1-4/+4
2016-01-10Multi::IRC: Make sure we keep our nickYorhel1-0/+18
2016-01-10Multi::Anime: Regularly resolve the AniDB API DNSYorhel1-15/+26
The API IP address doesn't change often, but we don't want months of downtime when it does.
2015-12-29Multi::API: Add support for TLSYorhel1-8/+23
2015-11-26Multi::IRC: Fix auth bypass bug + make !quote admin-onlyYorhel1-2/+2
2015-11-01Switch to HTML5 doctype + s/acronym/abbr/ + s/ / /eYorhel1-5/+3
I'd have preferred to stick with XHTML 1.0, but unfortunately browsers won't allow you to use modern Javascript APIs with an older doctype. Note that most pages don't actually validate correctly as HTML5, I'm relying on browsers to be lenient. In either case, I'd like VNDB to stay valid XML (XHTML5, then), and luckily that shouldn't be a problem.
2015-11-01Removed support for sha256-hashed passwordsYorhel1-5/+1
They had to be deleted from the database at some point, otherwise we still have thousands of easily-cracked password hashes in the database. Note that I could have opted to use scrypt on top of the sha256 hashes so the passwords would remain secure without needing to reset everything, but doing that after one year of switching to scrypt is likely not worth it. Everyone who still actively uses his account has already been converted to scrypt, everyone else should just reset their password whevener they decide to come back.
2015-10-25Multi::Anime: Avoid dead state when trying to fetch anime infoYorhel1-2/+2
Turns out the anime data hasn't been updated in a few months. Oops.
2015-10-21SQL: Fix Multi to use the new DB schemaYorhel5-163/+145
That should be the last thing to convert to the new schema.
2015-10-12Notifications: Allow max 500 notifies per user + add SQL index on uidYorhel1-0/+2
Turns out that fetching whether or not you have unread notifications (done on every pageview if you're logged in) was pretty slow. The index speeds up both that query and the "my notifications" view. The extra purge for old notifications for users with more than 500 notifications ensures that the index stays effective for the unread notifications count. Otherwise it'll have to read half of the notifications table anyway to check the 'unread' filter.
2015-09-08Multi::API: Set keepalive on sockets to detect dead TCP connectionsYorhel1-0/+1
Hopefully prevents issues like https://vndb.org/t3599.53
2015-07-21Multi::API: Support IPv6Yorhel1-1/+5
This was more trivial than I had expected. I already took ipv6 into account when rewriting the API for AnyEvent (including the use of norm_ip()), so that part was fine. The only part I had to fix was the listening socket, and I had to ensure that the $c->{ip} was correct. The first was easy, and the latter was properly handled by AnyEvent automatically. Looks like AnyEvent automatically 'unpacks' IPv4-mapped IPv6 addresses, so I didn't have to deal with that myself.
2015-07-20Multi::API: Throttle "throttled" error repliesYorhel1-3/+13
This is to save system resources when a misbehaving client keeps sending commands while it's being throttled. It also protects against trivial DoS attacks.
2015-07-18Multi::Maintenance: Fix bug in calculating timer for monthly cronYorhel1-1/+1
AE::timer accepts a time interval as argument, not a complete timestamp. So the monthly cron job hasn't run in a while...
2015-06-21Multi::IRC: Increase delay between random quotesYorhel1-1/+1
2015-06-15Multi::IRC: Some fixes wrt. chat loggingYorhel1-8/+6
2015-05-13Add staff statistic to main menuYorhel1-0/+1
2015-05-11Multi::{Core,Anime}: More fixes regarding UTF-8Yorhel2-11/+14
2015-04-29Multi::(API:IRC): Fix some unicode handling issuesYorhel2-6/+8
I forgot that AnyEvent::Handle works with bytes rather than unicode strings, even though that is kind of obvious. I expected that AnyEvent::IRC would automatically handle the conversion between byte strings and Unicode strings, but it doesn't, so that has to be done manually.
2015-04-27Multi::IRC: Properly handle connection issuesYorhel1-5/+28
2015-04-27Multi::Core: Make log level configurableYorhel1-1/+1
I probably don't want to have the 'trace' log level on the actual server.
2015-04-27Multi::API: Fixed various bugs found while testingYorhel1-4/+7
Ugh I wish I had proper unit tests. Ugh writing proper unit tests is a loooot more work than just doing a bunch of quick manual tests.
2015-04-27Multi::API: Fix bug when querying stuff while logged inYorhel1-1/+1
2015-04-27Multi::API: Fully implement the 'set' command with AnyEventYorhel1-58/+59
2015-04-27Multi::API: Fully implement 'get' command with AnyEventYorhel2-510/+317
2015-04-27Multi: Backport staff database changes from master branchYorhel2-7/+14
Includes changes from 5926ce95395976456c0e15895d13491a81819087 and e20b19ce400ccf382a969a51777e0678ff8d44db
2014-12-21Multi: WIP Converting Multi::API to AnyEventYorhel2-669/+636
2014-10-31Multi::IRC: Converted to use AnyEventYorhel2-525/+379
It's not as fully featured as the previous implementation, but most of those features haven't been used for the past few years anyway. Also added a generic throttle implementation in Multi::Core, which can be re-used for the API.
2014-10-29Multi: Use AnyEvent::Pg's last_query_start_time()Yorhel1-1/+2
The solution that has been implemented upstream is a little different from my patch, but it works well.
2014-10-28Multi: More convenient error handling for one-shot queriesYorhel2-10/+20
2014-10-24Multi::Anime: Converted to use AnyEventYorhel1-172/+176
2014-10-22Multi::RG: Converted to use AnyEventYorhel2-196/+190
AnyEvent::Util::run_cmd() is a godsent. POE was such a hassle in that area.
2014-10-22Multi::APIDump: Converted to use AnyEventYorhel1-94/+61
2014-10-22Multi::Maintenance: Converted to use AnyEventYorhel3-212/+152
2014-10-22Multi: Add pg_cmd function for more robust error handlingYorhel2-20/+49
2014-10-22Multi::Feed: Log SQL timesYorhel1-5/+4
Requires a patch to AnyEvent::Pg: https://rt.cpan.org/Ticket/Display.html?id=99719
2014-10-21Multi: Implement clean shutdown againYorhel2-9/+30
That is, stop all watchers that we want to stop and only shut down when there are no active watchers anymore. This ensures that we're not shutting down in the middle of some operation.
2014-10-21Multi: Rewrote Feed to AnyEvent + various fixesYorhel2-94/+111
2014-10-21Multi: Started on a rewrite to AnyEventYorhel1-74/+57
Currently only Multi::Core works, trying to use any other modules will fail.
2014-10-15Multi::API: Fix login with the new password format changesYorhel1-5/+19
2014-10-15Multi::API: Fix crash on failed loginYorhel1-2/+2
I broke this when changing the column type of login_throttle.timeout.
2014-10-13SQL: Use enum to represent platformsYorhel1-6/+7
I believe I didn't do this conversion earlier (back when I converted the language types) because PostgreSQL didn't support dynamically adding new values to an existing enum back then, and modifying an enum was a huge pain. Recent versions do support this, so there's no reason to keep it as a string. ...I just felt like adding some churn to the code base.
2014-10-11SQL: Convert login_throttle.timeout to a timestamptzYorhel1-2/+2
Easier to work with in custom queries.