i believe is on cleanup :) but i never tried /never tested...
for a second thaught i am take a look on daily cleanup and found this part
it is for you if you can solve , i will give you a beer :D
PHP Code:
mysql_query ('UPDATE users SET usergroup = \'' . UC_POWER_USER . '\', modcomment = CONCAT(\'' . gmdate ('Y-m-d') . ' - Promoted to POWER USER by -AutoSystem.
\', modcomment) WHERE id IN (0,' . implode (',', $userids) . ')');
++$CQueryCount;
savelog ('Following user(s) has been promoted to Power User Class: ' . implode (', ', $userids) . '. Reason: Automatic Promotion System!');
++$CQueryCount;
foreach ($userids as $pid)
{
send_pm ($pid, $lang->cronjobs['promote_message'], $lang->cronjobs['promote_subject']);
++$CQueryCount;
}
}
unset ($limit);
unset ($maxdt);
unset ($userids);
unset ($pid);
}
}
$query = mysql_query ('SELECT DISTINCT id FROM users WHERE usergroup = \'' . UC_POWER_USER . ('' . '\' AND uploaded / downloaded < ' . $demote_min_ratio . ' AND enabled=\'yes\''));
++$CQueryCount;
if (0 < mysql_num_rows ($query))
{
$userids = array ();
while ($arr = mysql_fetch_assoc ($query))
{
$userids[] = $arr['id'];
}
if (count ($userids))
{
mysql_query ('UPDATE users SET usergroup = \'' . UC_USER . '\', modcomment = CONCAT(\'' . gmdate ('Y-m-d') . ' - Demoted to USER by -AutoSystem.
\', modcomment) WHERE id IN (0,' . implode (',', $userids) . ')');
++$CQueryCount;
savelog ('Following user(s) has been demoted to User Class: ' . implode (', ', $userids) . '. Reason: Automatic Demotion System!');
++$CQueryCount;
foreach ($userids as $did)
{
send_pm ($did, sprintf ($lang->cronjobs['demote_message'], $demote_min_ratio), $lang->cronjobs['demote_subject']);
++$CQueryCount;
}
}
unset ($userids);
unset ($did);
}
and off cours this
PHP Code:
$limit = $promote_gig_limit * 1024 * 1024 * 1024;
$maxdt = TIMENOW - 86400 * $promote_min_reg_days;