AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   SourceBans / SourceBans++ (https://forums.alliedmods.net/forumdisplay.php?f=152)
-   -   SourceBans 2.0 Alpha (2013/09/04) (https://forums.alliedmods.net/showthread.php?t=219657)

asherkin 02-16-2015 11:54

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by Phaiz (Post 2262939)
So you are redoing it? Sorry just trying to figure out if i should be excited or not

He's building his own thing that isn't SourceBans.

Oo Alias oO 02-16-2015 13:23

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by asherkin (Post 2262947)
He's building his own thing that isn't SourceBans.

Well I am building my own thing, but I have called it Sourcebans (v3 in my head) and used the logo. I'm trying to base it on the current implementation too.

https://github.com/sourcetools/sourcebans

Take that with a pinch of salt, there's no instructions, it's far from done but it's working quite well at the moment.

The actual plugin would need updating (I know a guy, as does Snelvuur on here) but it'd be the same but using an API of the web.

Phaiz 02-16-2015 13:44

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by Oo Alias oO (Post 2262977)
Well I am building my own thing, but I have called it Sourcebans (v3 in my head) and used the logo. I'm trying to base it on the current implementation too.

https://github.com/sourcetools/sourcebans

Take that with a pinch of salt, there's no instructions, it's far from done but it's working quite well at the moment.

The actual plugin would need updating (I know a guy, as does Snelvuur on here) but it'd be the same but using an API of the web.

Will be interesting to see. Does it still support bans from other plugins such as votebans or smac bans?

Oo Alias oO 02-16-2015 13:47

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by Phaiz (Post 2262993)
Will be interesting to see. Does it still support bans from other plugins such as votebans or smac bans?

Yeah planning on doing all of that, I just need to keep going with it!

11530 02-16-2015 14:40

Re: SourceBans 2.0 Alpha (2013/09/04)
 
@Oo Alias oO If you're going to make it varied enough, call it something other than SourceBans. An... ahem.. alias.

hardboy 02-16-2015 15:00

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Error Latest release Error retrieving latest release.

i need release

Oo Alias oO 02-16-2015 16:14

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by 11530 (Post 2263011)
@Oo Alias oO If you're going to make it varied enough, call it something other than SourceBans. An... ahem.. alias.

Haha, everyone knows Sourcebans though :) Either way, only thing which need changing to do that is the logo :D

Just done the server adding/editing/removing though. You can only add a server if the IP:Port & RCON are correct.

Sarabveer 02-16-2015 21:10

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Moo...

My fork was a success though.

Phaiz 02-17-2015 06:23

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by Sarabveer (Post 2263113)
Moo...

My fork was a success though.

This isn't a branch of 1.4.x - this is completely different.

hardboy 02-17-2015 07:22

Re: SourceBans 2.0 Alpha (2013/09/04)
 
L 02/17/2015 - 01:12:55: [sourcebans.smx] Database failure: Could not find driver "mysql". See FAQ: http://www.sourcebans.net/node/20
L 02/17/2015 - 01:12:55: [sourcebans.smx] Database failure: Could not find driver "mysql". See FAQ: http://www.sourcebans.net/node/20
L 02/17/2015 - 01:12:55: [sourcebans.smx] Database failure: Could not find driver "mysql". See FAQ: http://www.sourcebans.net/node/20

how fix it?

Sarabveer 02-17-2015 21:08

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by Phaiz (Post 2263185)
This isn't a branch of 1.4.x - this is completely different.

I know this isn't a branch. I ain't stupid. This is more of a rewrite of SourceBans v2, and v2 was a rewrite of v1. 1.4.x branch of SourceBans is still the most reliable though. Peace-Maker is still updating the Google Code SVN from time to time.

Lets go back to watching anime. :)

Oo Alias oO 02-20-2015 17:41

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Trying to figure out how to handle group community bans.

I can get the group information fine (users in their etc), and I could technically add bans to the database from there... However that only works for players at the time of adding, and still bans people who are no longer in the group if they leave.

I could store the group information too, and then for each user check whether they're in the group... However that means for each user connecting to the server, I'd have to query the steam servers rather than just the local database.

Any suggestions?

JoB2C 02-20-2015 19:44

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by Oo Alias oO (Post 2264566)
Trying to figure out how to handle group community bans.

I can get the group information fine (users in their etc), and I could technically add bans to the database from there... However that only works for players at the time of adding, and still bans people who are no longer in the group if they leave.

I could store the group information too, and then for each user check whether they're in the group... However that means for each user connecting to the server, I'd have to query the steam servers rather than just the local database.

Any suggestions?

I made this some times ago.

Here is how I did it:

- A simple MySQL database table storing a list of banned groups. The table just had an index, and the group ID (groupID64 form).
- PHP script taking a steam ID (steamID64 form) as a parameter. Printing nothing if the user does not belong to any banned group, printing the group name in the other case.
- A plugin querying the PHP script when a client connects, kicking him if he's a member of a banned group.

If you want the PHP script, here it is:

PHP Code:

<?php
$db_host 
"127.0.0.1";
$db_user "user";
$db_password "password";
$db_name "database";
$db_table "groupbans";

function 
findMemberInPage(&$url$uid) {
    
$xml simplexml_load_file($url);
    if (
$xml === FALSE || !property_exists($xml"members"))
        return (
FALSE);
    
$members = (array)$xml->members;
    if (!
array_key_exists("steamID64"$members) || !is_array($members['steamID64']))
        return (
FALSE);
    if (
in_array($_GET['uid'], $members['steamID64']) !== FALSE)
        return (
$xml->groupDetails->groupName);
    if (
property_exists($xml"nextPageLink"))
        
$url $xml->nextPageLink;
    return (
FALSE);
}

error_reporting(0);
header("Content-Type: text/plain");
if (empty(
$_GET['uid']))
    exit;
$database = new PDO('mysql:host='.$db_host.';dbname='.$db_name$db_user$db_password);
$query $database->query("SELECT `groupid` FROM `".$db_table."`;");
while ((
$result $query->fetch())) {
    
$groupName FALSE;
    
$url "http://steamcommunity.com/gid/".$result['groupid']."/memberslistxml/?xml=1&p=1";
    while (
$url !== FALSE) {
        
$groupName findMemberInPage($url$_GET['uid']);
        if (
$groupName !== FALSE)
            break;
    }
    if (
$groupName !== FALSE) {
        echo 
$groupName;
        break;
    }
}
$query->closeCursor();
$database null;
?>

This script currently does not support memberlist pagination, then on huge groups only 1000 players are considered.

I don't have the plugin anymore, but it's not a really big deal, you just need to convert the client's steamid to steamid64, use curl (or whatever) to query the PHP script (with the id as the 'uid' URL parameter) and fetch the result. If result if blank, do nothing. If not, you kick the client (and optionnaly use the group name in the kick reason).

PS: You could do everything from the PHP script directly in the plugin.

EDIT: I included a version which supports multiple pages. There are 0 optimizations, so it can be slow.

Since the steam ids seems to be returned in ascending order, an optimization to start with would be not to fetch pages in numerical order, but rather compare id values from the middle-page (would divide execution time by 2, no?).

Oo Alias oO 02-21-2015 10:41

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by JoB2C (Post 2264594)
I made this some times ago.

Here is how I did it:

- A simple MySQL database table storing a list of banned groups. The table just had an index, and the group ID (groupID64 form).
- PHP script taking a steam ID (steamID64 form) as a parameter. Printing nothing if the user does not belong to any banned group, printing the group name in the other case.
- A plugin querying the PHP script when a client connects, kicking him if he's a member of a banned group.

If you want the PHP script, here it is:

PHP Code:

<?php
$db_host 
"127.0.0.1";
$db_user "user";
$db_password "password";
$db_name "database";
$db_table "groupbans";

function 
findMemberInPage(&$url$uid) {
    
$xml simplexml_load_file($url);
    if (
$xml === FALSE || !property_exists($xml"members"))
        return (
FALSE);
    
$members = (array)$xml->members;
    if (!
array_key_exists("steamID64"$members) || !is_array($members['steamID64']))
        return (
FALSE);
    if (
in_array($_GET['uid'], $members['steamID64']) !== FALSE)
        return (
$xml->groupDetails->groupName);
    if (
property_exists($xml"nextPageLink"))
        
$url $xml->nextPageLink;
    return (
FALSE);
}

error_reporting(0);
header("Content-Type: text/plain");
if (empty(
$_GET['uid']))
    exit;
$database = new PDO('mysql:host='.$db_host.';dbname='.$db_name$db_user$db_password);
$query $database->query("SELECT `groupid` FROM `".$db_table."`;");
while ((
$result $query->fetch())) {
    
$groupName FALSE;
    
$url "http://steamcommunity.com/gid/".$result['groupid']."/memberslistxml/?xml=1&p=1";
    while (
$url !== FALSE) {
        
$groupName findMemberInPage($url$_GET['uid']);
        if (
$groupName !== FALSE)
            break;
    }
    if (
$groupName !== FALSE) {
        echo 
$groupName;
        break;
    }
}
$query->closeCursor();
$database null;
?>

This script currently does not support memberlist pagination, then on huge groups only 1000 players are considered.

I don't have the plugin anymore, but it's not a really big deal, you just need to convert the client's steamid to steamid64, use curl (or whatever) to query the PHP script (with the id as the 'uid' URL parameter) and fetch the result. If result if blank, do nothing. If not, you kick the client (and optionnaly use the group name in the kick reason).

PS: You could do everything from the PHP script directly in the plugin.

EDIT: I included a version which supports multiple pages. There are 0 optimizations, so it can be slow.

Since the steam ids seems to be returned in ascending order, an optimization to start with would be not to fetch pages in numerical order, but rather compare id values from the middle-page (would divide execution time by 2, no?).

Okay cheers - querying the steam servers each time though doesn't seem ideal.

Does anyone know what data can be sent when a player tries to connect? Or is it literally just their Steam ID? Also, does anyone know any users in 1k+ groups so I can test?

Synthax 03-16-2015 03:51

Re: SourceBans 2.0 Alpha (2013/09/04)
 
So did this project die? It began 2 years ago and the latest update to the code was 7 months ago.

Sarabveer 03-16-2015 21:41

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Its probably in limbo, cause I know the SB devs are active, they haven't updated this project yet.

SnapDragon 04-16-2015 06:50

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Few ideas.
Not only bans, Add Kicks, Mutes, Gags, Warnings to this plugin and webpanel
IF you could add to this sourceban.sp to Temp. gags/mutes. [Ofcourse those also in webpanel]
Add Warnings. [And punishments are like kick, tempban.]
Also if you could make somekind of "Blocklist" so it will kick player with custom text.
In that text would be website where you can check your ban or if possible it show you how long are you still banned. Umm :bacon!:
Also like Bub bans. You can ban person for All your community servers. [Rootflag to this]

I hope you even read this. ;D

WildCard65 04-16-2015 07:12

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by SnapDragon (Post 2286861)
Few ideas.
Not only bans, Add Kicks, Mutes, Gags, Warnings to this plugin and webpanel
IF you could add to this sourceban.sp to Temp. gags/mutes. [Ofcourse those also in webpanel]
Add Warnings. [And punishments are like kick, tempban.]
Also if you could make somekind of "Blocklist" so it will kick player with custom text.
In that text would be website where you can check your ban or if possible it show you how long are you still banned. Umm :bacon!:
Also like Bub bans. You can ban person for All your community servers. [Rootflag to this]

I hope you even read this. ;D

There is a sourcecomms port for sb2.0. For warnings, a plugin for sb 2.0 will be needed, kick and temp banning are possible via gameserver commands only for now.

Argos 04-30-2015 08:07

Re: SourceBans 2.0 Alpha (2013/09/04)
 
I have problems with the installation, the installer fails to create the administrative user. the database is created but the admin fails to be inserted. someone can help me to add this manually from phpmyadmin?

shpakodin 05-07-2015 05:45

Re: SourceBans 2.0 Alpha (2013/09/04)
 
I hope this project will rise again. But for now, is there any solution for ban and view steam profile from popup menu?
Are any other sourcebans stable versions available with all functions working (old or new)? Or maybe any other solution "like" sourcebans?

shanapu 05-07-2015 06:51

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by shpakodin (Post 2294203)
Are any other sourcebans stable versions available with all functions working (old or new)? Or maybe any other solution "like" sourcebans?

im using SourceBans 1.5.2F-dev [FORK]

works like charm, no problems detected. SM 1.7 support

Robin955 05-12-2015 13:25

Re: SourceBans 2.0 Alpha (2013/09/04)
 
importing admin_groups was pretty waste of time, says successfull but it can only import the one group that has no overrides. that was no use
importing admins_simple.ini no use either.
have lots of admins and lots of admin groups with insane amount of commands denied. and part of this sourcemod was to easily get this in there. but typical that this had to happend.

but i got a feeling this sourcebans doesn't override admin_groups or admins_simple.ini so i can actually stay like i am? i imported the admins already but it didn't overwrite so im happy.

Phaiz 05-12-2015 15:31

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by Robin955 (Post 2295954)
importing admin_groups was pretty waste of time, says successfull but it can only import the one group that has no overrides. that was no use
importing admins_simple.ini no use either.
have lots of admins and lots of admin groups with insane amount of commands denied. and part of this sourcemod was to easily get this in there. but typical that this had to happend.

but i got a feeling this sourcebans doesn't override admin_groups or admins_simple.ini so i can actually stay like i am? i imported the admins already but it didn't overwrite so im happy.

I just imported my old database to the new install.. works fine.

Robin955 05-12-2015 20:08

Re: SourceBans 2.0 Alpha (2013/09/04)
 
database? i imported the admin_groups.cfg again and it says succesfully imported but it displays no new groups, aka back to beginning.

@OP
you forgot to put the "delete installation before use" after installing, if someone forgets that then they are screwd

Phaiz 05-12-2015 21:36

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by Robin955 (Post 2296070)
database? i imported the admin_groups.cfg again and it says succesfully imported but it displays no new groups, aka back to beginning.

@OP
you forgot to put the "delete installation before use" after installing, if someone forgets that then they are screwd

Sorry didn't realize that this was the 2.0 thread, ignore my post

Robin955 05-13-2015 18:40

Re: SourceBans 2.0 Alpha (2013/09/04)
 
yaeh i dont get it, pls help me here

i download the folder. i upload the web, i install the web to the Database, i connect the server to my database,
webpanel is working but i cant import admin_groups.cfg to admin groups (kinda expected that annyway)

my server shows, got the steam API key, wich i prob dont need either.
the Cfg called sourcebans where it says ServerIP is my server IP as the same i used in the panel when doing add server

and it wont display bans...... on css / windows 2012 i think and sourcemod 1.4.6
idk whats wrong but its killing me.

and this? how can i deny / allow commands when its simply a page with text and no box for adding deny/allow commands?


i feel dumber than ever asking all this.

well ok so i had a problem with the logs, i just deleted all of em and just saw the new ones.
Spoiler


so this sourceban doesn't have this ID 1 and ID 2-3-4-5 ++++ for each server? so it just asked for IP and isn't that what the error above is about
"ServerIP" "74.91.116.134"

Spoiler

Robin955 05-13-2015 22:40

Re: SourceBans 2.0 Alpha (2013/09/04)
 
well the 1.4.11 works for me tho. dont know why this doesn't

Sarabveer 05-14-2015 17:11

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by Robin955 (Post 2296470)
well the 1.4.11 works for me tho. dont know why this doesn't

Because Sb 2.0 is technically dead.

Cruckes 05-22-2015 15:07

Re: SourceBans 2.0 Alpha (2013/09/04)
 
SB 2.0 Alpha works fine with my TF2-server.
SM version is 1.7.0.

Sarabveer 05-22-2015 19:10

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by Cruckes (Post 2299807)
SB 2.0 Alpha works fine with my TF2-server.
SM version is 1.7.0.

Good for You.

SB 2.0, if it still was active would have been 10x better than 1.4.x

BraveFox 05-27-2015 13:23

help
 
where can I create database for the sourcebans?

Horsedick 05-28-2015 14:58

Re: help
 
Quote:

Originally Posted by BraveFox (Post 2301772)
where can I create database for the sourcebans?

Well anywhere you can I guess just need MySQL installed and setup properly. I think there is a white list of hosts around here some where.

nooberlin 06-07-2015 11:20

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Hello! I have installed SourceBans 2.0, and have one question...

https://github.com/GameConnect/SourceBans/issues/69

admins.cfg in 2.0.0-dev version dont work more? I try do add admin, and it work, but on my server admins.cfg file is still empty... Why?

DarkDeviL 06-07-2015 15:30

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by nooberlin (Post 2305651)
admins.cfg in 2.0.0-dev version dont work more? I try do add admin, and it work, but on my server admins.cfg file is still empty... Why?

SourceBans is not a synchronizing tool. It doesn't use files, but uses your MySQL database.

The old 1.4.x versions of SourceBans was writing to some files, which were BACKUP FILES ONLY. The files were never used unless your servers lost their access your MySQL server (e.g. the MySQL server was down). Even if the access was temporarily lost, SourceBans was only doing that during map changes and when you executed sm_rehash to reload from the SB database.

GinNNy 06-22-2015 04:13

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Any updates?
We didn't see any updates from 2013 :O

igotfits 06-24-2015 23:33

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Hows this coming along? any updates?

Kerem Er 07-21-2015 18:46

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by Carioca (Post 2190839)
Hi, i installed this alpha version and in my admin backend under administration / settings i can see on the left settings, plugins, logs. But when i click on it, nothing happens. Is this normal or did i install something wrong?

Also i need to know, how to delete the two lines "Your SourceBans install" and "Your new SourceBans install" on the mainpage / dashboard site. Is this possible to delete or change like in this demo?

actually is not problem. you can change any settings, see logs or plugins on db

BatyaMedic 08-21-2015 09:33

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Is this dead?

selax 08-29-2015 17:37

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Dead?

DarkDeviL 08-29-2015 19:14

Re: SourceBans 2.0 Alpha (2013/09/04)
 
Quote:

Originally Posted by SelaX (Post 2338093)
Dead?

Depends how you define dead -

However, according to the commit ("development") history for SB 2.0, it seems quite silent.


All times are GMT -4. The time now is 19:02.

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