Raised This Month: $12 Target: $400
 3% 

Release Donation Control 3.1.0 [over 1000 donations served!]


Post New Thread Reply   
 
Thread Tools Display Modes
Phaiz
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 04-03-2014 , 17:26   Re: Donation Control 2.0.4 [updated 11-9-13]
Reply With Quote #211

I'm still trying to get it to connect to the database. The config lookup file does not work because it shows nothing of what I'm told to find in it.
Phaiz is offline
samsah
AlliedModders Donor
Join Date: Mar 2008
Location: Finland
Old 04-04-2014 , 04:41   Re: Donation Control 2.0.4 [updated 11-9-13]
Reply With Quote #212

Can you make it change players nick which includes symbol ' or /
It will screw up admins.cfg
Example of name: Player/can't run
Code:
"Admins"
{
    "Player"
    {
        "can't run"
        {
            "auth"        "steam"
            "identity"        "STEAM_0:0:123456789"
            "group"        "VIP"
        }
    }
}
Not a big deal but it spams error after every adminreload:
[admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admins.cfg
[admin-flatfile.smx] (line x) Failed to create admin: did you forget either the auth or identity properties?

Funny though, when adding/editing user in Sourcebans it allows / but not '
__________________
samsah is offline
darkboy245
Senior Member
Join Date: Feb 2014
Old 04-04-2014 , 07:47   Re: Donation Control 2.0.4 [updated 11-9-13]
Reply With Quote #213

Cant connect to the database.. I'm sure I filled in the right information it just wont connect..
darkboy245 is offline
Phaiz
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 04-04-2014 , 18:38   Re: Donation Control 2.0.4 [updated 11-9-13]
Reply With Quote #214

Quote:
Originally Posted by darkboy245 View Post
Cant connect to the database.. I'm sure I filled in the right information it just wont connect..
I'm having this same issue. My other plugins have no problems connecting to databases
Phaiz is offline
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 04-04-2014 , 19:43   Re: Donation Control 2.0.4 [updated 11-9-13]
Reply With Quote #215

Quote:
Originally Posted by Donski View Post
Everytime I try to donate it gives me an error that Steam ID cannot be found.
Everytime I try to do a 'manual entry' it creates the account (with correct group server and stuff) but there's no SteamID and name.

I'm not usually this dumb but tbh the instructions were really confusing. I've already made sure that all the infromation in the config are correct.
What seems to be the problem?

Thanks! Awesome plugin.
You probably dont have the API key set.
__________________
nineteeneleven is offline
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 04-04-2014 , 20:52   Re: Donation Control 2.0.4 [updated 11-9-13]
Reply With Quote #216

Quote:
Originally Posted by samsah View Post
Can you make it change players nick which includes symbol ' or /
It will screw up admins.cfg
Example of name: Player/can't run
Code:
"Admins"
{
    "Player"
    {
        "can't run"
        {
            "auth"        "steam"
            "identity"        "STEAM_0:0:123456789"
            "group"        "VIP"
        }
    }
}
Not a big deal but it spams error after every adminreload:
[admin-flatfile.smx] Error(s) detected parsing addons/sourcemod/configs/admins.cfg
[admin-flatfile.smx] (line x) Failed to create admin: did you forget either the auth or identity properties?

Funny though, when adding/editing user in Sourcebans it allows / but not '


heres a quick fix
add this on line 145 of includes/class_lib.php


PHP Code:
$steam_id str_replace(array("/","'" ), ""$steam_id); 

the whole method should look like this.
PHP Code:
   public function addDonor($steam_id$username$tier){
//check sourcebans database to see if user is already in there
    
$group $this->getGroup($tier);
    
$steam_id str_replace(array("/","'" ), ""$steam_id);
    
$sb_pw "1fcc1a43dfb4a474abb925f54e65f426e932b59e";

    
$result$this->db->query("SELECT * FROM ".SB_PREFIX."_admins WHERE authid='".$steam_id."';") or die($this->db->error " " $this->db->errno);

        if(
$result){
            
$row=$result->fetch_array(MYSQLI_ASSOC);
            
$sb_aid $row['aid'];
        } 

    if (isset(
$sb_aid)) {
        return (
"user is already in the Sourcebans database.<br /> Aborting. <br /> <a href='javascript:history.go(-1);'>Click here to go back</a>");
    } else {
        
//if not, PUT EM IN!

                
$sb_sql "INSERT INTO `".SOURCEBANS_DB."` . `".SB_PREFIX."_admins` (user,authid,password,gid,extraflags,immunity,srv_group) VALUES ('{$username}', '{$steam_id}', '{$sb_pw}' , '-1' , '0' , '0', '".$group['name']."');";
                
$this->db->query($sb_sql) or die($this->db->error " " $this->db->errno);
                
                
$admin_id $this->db->insert_id;
                
                
$sb_sql2 "INSERT INTO `".SOURCEBANS_DB."` . `".SB_PREFIX."_admins_servers_groups` (admin_id,group_id,srv_group_id,server_id) VALUES('{$admin_id}', '".$group['group_id']."', '".$group['srv_group_id']."', '".$group['server_id']."');"
                
$this->db->query($sb_sql2) or die($this->db->error " " $this->db->errno);
                
                
// if (!$this->queryServers('sm_reloadadmins')) { 
                //     return "<h1>Server rehash failed</h1>";
                // }
        
}

        return 
TRUE;

    } 
__________________
nineteeneleven is offline
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 04-04-2014 , 21:13   Re: Donation Control 2.0.4 [updated 11-9-13]
Reply With Quote #217

Quote:
Originally Posted by Phaiz View Post
I'm still trying to get it to connect to the database. The config lookup file does not work because it shows nothing of what I'm told to find in it.
if your not using mckays analytics plugin, try setting player_tracker to false.

Its that way be default as of like last week. Snelvuur pointed that out the other day to me.
__________________

Last edited by nineteeneleven; 04-04-2014 at 21:13.
nineteeneleven is offline
nineteeneleven
Veteran Member
Join Date: Nov 2010
Old 04-04-2014 , 21:16   Re: Donation Control 2.0.4 [updated 11-9-13]
Reply With Quote #218

Oh also for those of you who havent noticed theres a top10 module which will also display the last 30 days of donations too. Its in the latest commit of the bitbucket repo.
__________________

Last edited by nineteeneleven; 04-04-2014 at 21:16.
nineteeneleven is offline
Donski
Senior Member
Join Date: Sep 2012
Old 04-04-2014 , 22:17   Re: Donation Control 2.0.4 [updated 11-9-13]
Reply With Quote #219

Quote:
Originally Posted by nineteeneleven View Post
You probably dont have the API key set.
Goddamn that was it. I can't believe I missed that. Thanks 1911!
Donski is offline
Advokat
Member
Join Date: Mar 2014
Location: Australia
Old 04-05-2014 , 01:07   Re: Donation Control 2.0.4 [updated 11-9-13]
Reply With Quote #220

Quote:
Originally Posted by nineteeneleven View Post
You probably dont have the API key set.
I am not a smart man...this has fixed my issue. Plugin appears to be working perfectly. Curious, would there be any potential for a set minimum donation amount? In any case, thanks for all your work, man. It's not that much but hopefully enough for a few beers, on me.

Last edited by Advokat; 04-05-2014 at 04:00.
Advokat is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode