2012-03-08 21:07:46 +00:00
|
|
|
<?php
|
2013-01-19 19:36:40 +00:00
|
|
|
namespace chat\system\cronjob;
|
|
|
|
use \chat\data;
|
2012-03-08 21:07:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Vaporizes unneeded data.
|
|
|
|
*
|
|
|
|
* @author Tim Düsterhus
|
2013-01-19 19:36:40 +00:00
|
|
|
* @copyright 2010-2013 Tim Düsterhus
|
2012-03-08 21:07:46 +00:00
|
|
|
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
|
2013-01-19 19:36:40 +00:00
|
|
|
* @package be.bastelstu.chat
|
2012-03-08 21:07:46 +00:00
|
|
|
* @subpackage system.cronjob
|
|
|
|
*/
|
2013-01-27 16:27:47 +00:00
|
|
|
class CleanupCronjob implements \wcf\system\cronjob\ICronjob {
|
2012-03-08 21:07:46 +00:00
|
|
|
/**
|
|
|
|
* @see wcf\system\ICronjob::execute()
|
|
|
|
*/
|
|
|
|
public function execute(\wcf\data\cronjob\Cronjob $cronjob) {
|
2013-01-19 19:36:40 +00:00
|
|
|
$messageAction = new data\message\MessageAction(array(), 'prune');
|
2012-05-19 18:33:25 +00:00
|
|
|
$messageAction->executeAction();
|
2013-01-19 19:36:40 +00:00
|
|
|
$roomAction = new data\room\RoomAction(array(), 'prune');
|
2012-05-19 18:33:25 +00:00
|
|
|
$roomAction->executeAction();
|
2013-01-19 19:36:40 +00:00
|
|
|
$suspensionAction = new data\suspension\SuspensionAction(array(), 'prune');
|
2012-10-20 16:24:48 +00:00
|
|
|
$suspensionAction->executeAction();
|
|
|
|
|
2012-04-19 13:06:34 +00:00
|
|
|
// kill dead users
|
2013-05-03 18:02:18 +00:00
|
|
|
$roomAction = new data\room\RoomAction(array(), 'removeDeadUsers');
|
|
|
|
$roomAction->executeAction();
|
2012-03-08 21:07:46 +00:00
|
|
|
}
|
|
|
|
}
|