Exemplo n.º 1
0
/**
The actual Activity Check functionality
*/
function run_activitycheck()
{
    global $mybb, $db, $cache;
    $masterclass = new RPGSuite($mybb, $db, $cache);
    $grouplist = $masterclass->get_icgroups_members('activitycheck = 1');
    foreach ($grouplist as $id => $group) {
        foreach ($group->get_members() as $member) {
            $user = $member->get_info();
            if (inactive($member)) {
                $group->hard_remove_member($user['uid']);
            }
        }
    }
}
Exemplo n.º 2
0
/**
The actual Group Point functionality
*/
function run_grouppoints()
{
    global $mybb, $db, $cache;
    $masterclass = new RPGSuite($mybb, $db, $cache);
    $grouplist = $masterclass->get_icgroups_members('grouppoints <> 0');
    foreach ($grouplist as $group) {
        foreach ($group['members'] as $member) {
            $currentpoints = $member[Fields::GROUPPOINTS];
            if ($group['grouppoints'] > 0) {
                $member->set_grouppoints(max(array($mybb->settings['rpgsuite_grouppoints_max'], $currentpoints + point_variance($group['grouppoints']))));
            } else {
                $member->set_grouppoints(min(array(0, $currentpoints + point_variance($group['grouppoints']))));
            }
        }
    }
}
Exemplo n.º 3
0
function groupstats_display()
{
    global $mybb, $db, $cache, $templates, $groupstats, $statlist, $maletot, $femaletot, $youthtot, $adulttot, $limitgroupcount;
    $maletot = $femaletot = $youthtot = $adulttot = $overalltot = $limitgroupcount = 0;
    $adultlimit = Stats::ADULTCAP;
    $youthlimit = Stats::YOUTHCAP;
    $rpg = new RPGSuite($mybb, $db, $cache);
    eval("\$statlist = \"\";");
    $rowcount = 0;
    foreach ($rpg->get_icgroups_members() as $id => $usergroup) {
        $statlist .= build_row($usergroup, $rowcount, $adultlimit, $youthlimit);
        $rowcount++;
    }
    $overalltot = $maletot + $femaletot;
    $grouplimit = ceil($overalltot / $adultlimit);
    eval("\$groupstats = \"" . $templates->get('rpggroupstats_full') . "\";");
}