Raised This Month: $32 Target: $400
 8% 

Add Bans Via PHP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zeroibis
Veteran Member
Join Date: Jun 2007
Old 12-26-2012 , 16:56   Add Bans Via PHP
Reply With Quote #1

I want to be able to add bans from non sourcemod/sourcebans supported games automatically. In order to do so I plan to create a php script that will add the bans from the non sourcemod games directly to the remote sql sourcebans database. However, I do not know how the bans should be added.

Where in the database should new bans be added? What is the recommended sql call to preform the add of a ban and or the removal of one.
__________________
zeroibis is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 12-30-2012 , 15:29   Re: Add Bans Via PHP
Reply With Quote #2

It only requires an entry in the sb_bans table. Check the plugin's code to see an example query. You should make sure, that the player isn't banned already.

What kind of game are we talking about? No steamids?
__________________
Peace-Maker is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 01-02-2013 , 12:15   Re: Add Bans Via PHP
Reply With Quote #3

Natural Selection 2. The game does use steam ids but numerical ones rather than strings. There is a conversion formula that allows the numerical steam id to become a string like normal and vice versa.

I will read over the code and post an example write in here before I do anything. I just do not want to risk corrupting my ban list lol.
__________________
zeroibis is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 01-09-2013 , 19:06   Re: Add Bans Via PHP
Reply With Quote #4

There was some home grown plans to try to do something like this some time ago, though none of us ever got around to fully implementing it. Ultimately it would work with any game that allows an rcon kick, an rcon ban, and logging or plugin functionality.
__________________
Please do NOT PM for support.

Only ask for support in plugin threads.

TunedChaos.com - Precision Tuned Game Servers
FlyingMongoose is offline
Reply



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 22:44.


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