summaryrefslogtreecommitdiff
path: root/lib/Multi
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-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 timestamptzYorhel2-13/+13
That was the last one. I hope I haven't forgotten to update anything.
2009-08-08Converted tags.added to timestamptzYorhel1-1/+1
2009-08-08Converted threads_posts.date and edited to timestamptzYorhel1-1/+1
Everything still seems to be working fine so far.
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-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-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-23Remove session aliases in shutdown handlerYorhel5-0/+5
This isn't really necessary when shutting down the entire process, but it is for the individual session to shut down. This will make it possible to load/unload/reload Multi modules on demand without restarting the process.
2009-07-23Implemented relgraph notify from PgSQL triggerYorhel1-0/+2
This finishes the new relation graph generator, as it'll now regenerate graphs as soon as is needed. This obsletes the VNDB::Util::Misc::vnCacheUpdate() function, this functionality is provided by triggers within PostgreSQL. The update_vncache(0) procedure is now significantly slower due to the trigger on the vn table. It'd be a good idea to rewrite this procedure by using triggers and conditional updates, to drastically lower the number of rows that need to be updated.
2009-07-19Rewrote Multi::RGYorhel1-129/+88
It should be a bit more efficient and non-blocking. Also a lot less verbose with logging.
2009-07-19Multi::Core: Correctly set the pg_enable_utf8 flagYorhel1-1/+1
Before this edit, the options part of the DSN was incorrect, resulting in DBD::Pg ignoring the pg_enable_utf8 flag.
2009-07-19Notify Multi::Image via PostgreSQL for new screenshotsYorhel1-2/+2
This finished the rewrite of Multi::Image and everything surrounding it.
2009-07-19Converted and renamed screenshots.status (int) to processed (bool)Yorhel1-3/+3
There were only two states, processed and unprocessed, so simply using a boolean column with correct naming is more clarifying.
2009-07-18Notify Multi::Image for new cover images via LISTEN/NOTIFYYorhel1-0/+2
Yay! Another weird shared-memory-command optimized away. And the image resizer reacts a lot faster now. Noticably, even.
2009-07-18Rewrote Multi::ImageYorhel1-164/+61
Decided to remove the Image::MetaData::JPEG dependency as well, as the Image::Magick::Thumbnail function removes a lot of unecessary information, profiles and other data as well.
2009-07-18Use PostgreSQL's LISTEN/NOTIFY to notify Multi::Anime for new animeYorhel1-1/+5
The notify is called from a trigger function, which is called on any UPDATE or INSERT INTO query of which the lastfetch column is NULL. This guarantees that anime info in the DB will always be updated, no matter how its inserted.
2009-07-18Rewrote Multi::AnimeYorhel1-162/+104
No shared memory! Asynchronous SQL! yay!
2009-07-17Rewrote Multi::Sitemap and included tag pagesYorhel1-75/+73
This should've taken me less than an hour, but unfortunately it took a bit longer because I found a rather hard-to-fix bug in PoCo::Pg. Be sure to update to the latest POE::Component::Pg. Also, this change removes the DateTime dependency. Its functionality could be replaced with the strftime() found in POSIX (which every Perl has)
2009-07-17Multi::Core: Handle SIGTERM and SIGINTYorhel1-13/+30
These events will be signalled to Multi's modules as a 'shutdown' signal.
2009-07-16Made a start on the Multi-rewriteYorhel1-101/+37
Started on multi.pl and Multi::Core, the main differences: - Uses POE::Component::Pg now (get it from http://g.blicky.net/poco-pg.git/) - Doesn't use shared memory anymore - No 'commands' anymore, every session has to handle its own events (communication goes either through POE itself, or the PostgreSQL DB) - No weird Cron stuff anymore All other Multi modules will have to be updated/rewritten to reflect these changes. None of them will work at the moment.
2009-07-03Implemented master_users check in Multi::IRCYorhel1-0/+1
2009-04-11SQL bugfix in Multi's "maintenance integrity"Yorhel1-1/+1
2009-03-15Fixed Multi's ircnotify command for tagsYorhel1-1/+1
2009-03-15Let Multi recalculate users.c_tags each month, and some warning fixesYorhel1-0/+6
2009-03-14Handling of g# in Multi and bb2html, and IRC notify on tag creationYorhel1-5/+6
2009-03-08Added caching of tags_vn_bayesian and the VN count for tagsYorhel1-4/+13
Updated hourly by Multi. May want to look for a better way to update this cache, because I'm afraid the current tags_vn_calc() is going to perform very badly on larger databases.
2009-01-10Automatically recalculate the vn popularity daily using Multi::MaintenanceYorhel1-3/+11
2008-12-14Relative documentation path in Multi::Sitemap + lastmod of d+ pagesYorhel1-2/+2
2008-12-07Fixed a few bugs with the sitemap generator and cleaned up the code a bitYorhel1-14/+9
2008-11-29Made Multi update the two new caches every first day of the monthYorhel1-3/+36
May actually be a better idea to just log a HUGE WARNING in case the cached values don't match the actual values, as that really shouldn't happen. But oh well, updating is fine, too. Makes sure everything stays correct in the long term.
2008-11-21Updated relation graph generator with new coloursYorhel1-7/+8
...these colours look horrible on light skins, need to find a solution to that >.>
2008-11-20Related anime on VN pagesYorhel1-13/+2
2008-11-12Fixed Multi to use relative paths and to use the new configuration filesYorhel5-32/+42
2008-08-20Converted relation graphs to PNGyorhel1-3/+3
git-svn-id: svn://vndb.org/vndb@101 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-08-18Found a definite and proper solution to fix the command synchronisation ↵yorhel3-7/+2
problems, fixed display of wrong ID for screenshot diff, and increased screenshot JPEG quality to 90 git-svn-id: svn://vndb.org/vndb@95 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-08-18Multi can be a bit too fast sometimes...yorhel1-1/+1
git-svn-id: svn://vndb.org/vndb@94 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b