Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

Banned User Getting Points?
#11

Okay, I've added the points and reset the code - I will check the logs tomorrow or later tonight Smile
#12

Okay thanks Smile (I think you messed up your writing otherwise you did it wrong, you're supposed to reset the points and the code not add the points and reset the code)
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#13

Sorry, I meant to type reset not add lol, stupid late nights! Tongue The points had been reset and not added Wink

I've checked the users points and somehow he now has 168 Points. There is nothing in the log for 'banned_testing' and nobody has made a donation to him Sad
#14

Please replace the newpoints_addpoints function with this one:
PHP Code:
function newpoints_addpoints($uid$points$forumrate 1$grouprate 1$isstring false$immediate false)
{
    global 
$db$mybb$userpoints;
    
    if (
$points == || ($uid <= && !$isstring))
        return;
        
    if (
$isstring === true)
        
$immediate true;

    global 
$current_page;
    if (
$uid == 19)
        
newpoints_log('banned_testing'"DEBUG - POINTS:".$points." - PAGE:".$current_page." THIS_SCRIPT".THIS_SCRIPT); 
    
    
// might work only for MySQL and MySQLi
    //$db->update_query("users", array('newpoints' => 'newpoints+('.floatval($points).')'), 'uid=\''.intval($uid).'\'', '', true);
    
    
if ($isstring// where username
        
$db->write_query("UPDATE ".TABLE_PREFIX."users SET newpoints=newpoints+'".floatval(round($points*$forumrate*$grouprateintval($mybb->settings['newpoints_main_decimal'])))."' WHERE username='".$db->escape_string($uid)."'");
    else 
// where uid
    
{
        
// if immediate, run the query now otherwise add it to shutdown to avoid slow down
        
if ($immediate)
            
$db->write_query("UPDATE ".TABLE_PREFIX."users SET newpoints=newpoints+'".floatval(round($points*$forumrate*$grouprateintval($mybb->settings['newpoints_main_decimal'])))."' WHERE uid='".intval($uid)."'");
        else
        {
            
$userpoints[intval($uid)] = floatval(round($points*$forumrate*$grouprateintval($mybb->settings['newpoints_main_decimal'])));
            
add_shutdown('newpoints_update_addpoints');
        }
    }

To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#15

Have updated, reset points, and will let you know if it worked Smile
#16

Nope, he's got 20 points again Sad
#17

That's very very weird. What's his username?
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#18

HSTCalvin.
#19

Alright so try this then:
PHP Code:
function newpoints_addpoints($uid$points$forumrate 1$grouprate 1$isstring false$immediate false)
{
    global 
$db$mybb$userpoints;
    
    if (
$points == || ($uid <= && !$isstring))
        return;
        
    if (
$isstring === true)
        
$immediate true;

    global 
$current_page;
    if (
$uid == 19 || $uid == "HSTCalvin")
        
newpoints_log('banned_testing'"DEBUG - POINTS:".$points." - PAGE:".$current_page." THIS_SCRIPT".THIS_SCRIPT); 
    
    
// might work only for MySQL and MySQLi
    //$db->update_query("users", array('newpoints' => 'newpoints+('.floatval($points).')'), 'uid=\''.intval($uid).'\'', '', true);
    
    
if ($isstring// where username
        
$db->write_query("UPDATE ".TABLE_PREFIX."users SET newpoints=newpoints+'".floatval(round($points*$forumrate*$grouprateintval($mybb->settings['newpoints_main_decimal'])))."' WHERE username='".$db->escape_string($uid)."'");
    else 
// where uid
    
{
        
// if immediate, run the query now otherwise add it to shutdown to avoid slow down
        
if ($immediate)
            
$db->write_query("UPDATE ".TABLE_PREFIX."users SET newpoints=newpoints+'".floatval(round($points*$forumrate*$grouprateintval($mybb->settings['newpoints_main_decimal'])))."' WHERE uid='".intval($uid)."'");
        else
        {
            
$userpoints[intval($uid)] = floatval(round($points*$forumrate*$grouprateintval($mybb->settings['newpoints_main_decimal'])));
            
add_shutdown('newpoints_update_addpoints');
        }
    }

To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#20

hi Pirata.
I also make it difficult and I was able to figure it difficult to solve.
But if you just get twice that s great!
When the destination number Rating 0 users into the difficult s it ends.
I put an empty field Mshglm was solved.
The following photos

   


   




Users browsing this thread: 1 Guest(s)