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

Release Legacy SourceBans 1.4.11 (Updated 2014/02/17)


Post New Thread Closed Thread   
 
Thread Tools Display Modes
WebNoob
Senior Member
Join Date: Jul 2008
Old 03-01-2011 , 10:11   Re: SourceBans 1.4.7 (Updated 08/22/10)
#2341

Quick question:

We've had a couple of instances recently where our remote database server went down. I thought that if the game servers lost the database connection they would simply pull the admins/permissions from the admins.cfg file located on the game server. However, when the database server went down, all the admins lost their permissions on the server as well.

I DO have admin-flatfile.smx enabled in the plugins folder, and "BackupConfigs" "1" is set in the Sourcebans config.

Am I missing a setting somewhere that would allow the servers to pull the info from the local admins.cfg file if it cannot connect to the Sourcebans database?
WebNoob is offline
eric0279
AlliedModders Donor
Join Date: May 2007
Old 03-02-2011 , 02:25   Re: SourceBans 1.4.7 (Updated 08/22/10)
#2342

Hi,

Code:
rcon sm_ban <userid> lengh

userid is not found :s

Last edited by eric0279; 03-02-2011 at 03:15.
eric0279 is offline
MjrNuT
SourceMod Donor
Join Date: Feb 2008
Location: Under the Beaming CA Sun
Old 03-02-2011 , 16:34   Submitting Ban via Webpanel - SteamID REGEX Checking?
#2343

(I haven't tried this as I just thought about it and don't have access till much later tonight)

When you go to submit or enter a ban via the webpanel and choose by SteamID, what happens if you enter a non-valid STeamID?

I presume it will tell you its invalid SteamID.

Invalid SteamID meaning:

  1. Does not exist (i.e., STEAM_0:1:0000000, STEAM_0:1:123456)
  2. Miss typed character of a valid SteamID.
Is there a message that states the SteamID is invalid? If so, I guess the there is a check for SteamIDs, is that right?

Thanks
__________________
Flames and Ash Gaming
Addon: SM v1.4.0-dev MM 1.8.5-dev
Plugins: Advertisements, Webshortcuts, spray tracer, SBans, RTD, gScramble Balance, misc
MjrNuT is offline
MjrNuT
SourceMod Donor
Join Date: Feb 2008
Location: Under the Beaming CA Sun
Old 03-03-2011 , 01:36   Re: SourceBans 1.4.7 (Updated 08/22/10)
#2344

Ok, I tested and glad to see that the SBans guys are worth every once of respect!!

I see on page.submit.php the function of !validate_steam($Steam_ID).

I see in file user-functions.php =>

Quote:
function validate_steam($steam)
{
return preg_match(STEAM_FORMAT, $steam) ? true : false;
}

From here I don't know where to go in finding out how this validation is performed. Any helpful direction here?

Thanks
__________________
Flames and Ash Gaming
Addon: SM v1.4.0-dev MM 1.8.5-dev
Plugins: Advertisements, Webshortcuts, spray tracer, SBans, RTD, gScramble Balance, misc
MjrNuT is offline
Adjo
Member
Join Date: Dec 2009
Location: UK
Old 03-03-2011 , 03:22   Re: SourceBans 1.4.7 (Updated 08/22/10)
#2345

Quote:
Originally Posted by MjrNuT View Post
From here I don't know where to go in finding out how this validation is performed. Any helpful direction here?

Thanks
STEAM_FORMAT is defined in init.php, line 166:
PHP Code:
define('STEAM_FORMAT'"/^STEAM_[0-9]:[0-9]:[0-9]+$/"); 
This is what checks if it's valid or not, so you could do something like:
PHP Code:
<!DOCTYPE html>
<html>
    <head>
        <title>SteamID Checker</title>
    </head>
    <body>
        <form action="" method="POST">
            <input type="text" name="steamid" />
            <input type="submit" />
        </form>
<?php
    
if(isset($_POST['steamid'])){
        
$input htmlentities($_POST['steamid']);
        if(!
preg_match("/^STEAM_[0-9]:[0-9]:[0-9]+$/"$input)){
            echo 
'Invalid Steam ID.';
        }else{
            echo 
'Valid Steam ID! <br /> '.$input.'';
        }
    }
?>
    </body>
</html>
to tell if a entered steamID is valid or not.
Adjo is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 03-03-2011 , 04:28   Re: SourceBans 1.4.7 (Updated 08/22/10)
#2346

Quote:
Originally Posted by sinblaster View Post
Still this mate. #2302 #2316

Short story is
no errors, every firewall used has been changed to allow my 3 game ports. The ban system is flawless, its an awesome banning system. In short the web interface just doesnt want to connect to the game servers from web. I've exhausted myself with avenues.

Heres the sourceban web interface, you can see plainly "error connecting"
111.118.164.162
If you really are sure, that all firewall settings are correct, it has to be some kind of php restriction. Do you receive any special errors with the debug checkbox checked in the settings page?

You may want to try Brizad's modification to use socket_bind() in CServerInfo.php and CServerRcon.php. You need to define BIND_IP in your config.php with your webserver's ip.
PHP Code:
define('BIND_IP''87.65.43.21'); 
Quote:
Originally Posted by WebNoob View Post
Quick question:

We've had a couple of instances recently where our remote database server went down. I thought that if the game servers lost the database connection they would simply pull the admins/permissions from the admins.cfg file located on the game server. However, when the database server went down, all the admins lost their permissions on the server as well.

I DO have admin-flatfile.smx enabled in the plugins folder, and "BackupConfigs" "1" is set in the Sourcebans config.

Am I missing a setting somewhere that would allow the servers to pull the info from the local admins.cfg file if it cannot connect to the Sourcebans database?
Congratulations, you're the first admin to test, if the provided upcoming fix in 1.4.8 actually fixes the issue. Seriously, try this version please.

Quote:
Originally Posted by eric0279 View Post
Hi,

Code:
rcon sm_ban <userid> lengh
userid is not found :s
Code:
rcon sm_ban #userid length "reason"
is the correct format. Make sure, you enter a valid userid ofc;)
__________________
Peace-Maker is offline
WebNoob
Senior Member
Join Date: Jul 2008
Old 03-03-2011 , 12:30   Re: SourceBans 1.4.7 (Updated 08/22/10)
#2347

Quote:
Originally Posted by Peace-Maker View Post
Congratulations, you're the first admin to test, if the provided upcoming fix in 1.4.8 actually fixes the issue. Seriously, try this version please.
OK...I changed the Sourcebans IP address in the database.cfg so that the game server could not connect, and restarted using the plugin above. It appeared all my admin functions were operational, so it looks like it worked.

Keep in mind this was a limited test, with me alone on a private server. I will try to get a test on a full (32 player) server today.
WebNoob is offline
eric0279
AlliedModders Donor
Join Date: May 2007
Old 03-03-2011 , 15:49   Re: SourceBans 1.4.7 (Updated 08/22/10)
#2348

Quote:
Originally Posted by Peace-Maker

Code:
rcon sm_ban #userid length "reason"
is the correct format. Make sure, you enter a valid userid ofc;)
It's good... strange...
eric0279 is offline
MjrNuT
SourceMod Donor
Join Date: Feb 2008
Location: Under the Beaming CA Sun
Old 03-04-2011 , 13:30   Re: SourceBans 1.4.7 (Updated 08/22/10)
#2349

Quote:
Originally Posted by Adjo View Post
STEAM_FORMAT is defined in init.php, line 166:
PHP Code:
define('STEAM_FORMAT'"/^STEAM_[0-9]:[0-9]:[0-9]+$/"); 
This is what checks if it's valid or not, so you could do something like:
to tell if a entered steamID is valid or not.
Adjo,

Thanks alot for your input there. Indeed that works.

I flawed my query though. Apparently, my example of STEAM_0:0:123456 is valid in the sense of meeting the Regex. So, Sourcebans will accept a submission on a bogus (properly submitted) SteamID.

Any chance of being able to actually validate a SteamID? Is there php (publically available) code that goes to check Vac Status or maybe just simply checking a Community ID exists?

I'd like someone to enter a SteamID, if its legit valid, then proceed. Otherwise...state that it does not exist.
__________________
Flames and Ash Gaming
Addon: SM v1.4.0-dev MM 1.8.5-dev
Plugins: Advertisements, Webshortcuts, spray tracer, SBans, RTD, gScramble Balance, misc
MjrNuT is offline
marrr
Senior Member
Join Date: Jun 2008
Old 03-06-2011 , 12:20   Re: SourceBans 1.4.7 (Updated 08/22/10)
#2350

I hope 1.4.8 is coming soon..
marrr is offline
Closed Thread



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 15:06.


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