Installing Sourcebans

Connect with other users about what to run on your webhosting (and how to run it) here.
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Fri May 18, 2012 3:20 pm

Re: Installing Sourcebans

Post by soja »

That github link is for sourcebans 2, which is not ready for use(last I checked).

I use 1.4.10/11 for my servers, and I would suggest you do the same.

https://forums.alliedmods.net/showthread.php?t=61000
Not a NFO employee
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

Soya thank you for that link the installation went well

http://awpwnage2.site.nfoservers.com/so ... php?p=home

however I am still showing errors in the log file.

Nuke server (awpwnage2.game.nfoservers.com)
L 12/30/2014 - 11:00:38: [sourcebans.smx] Failed to query database. (Unknown column 'id' in 'field list')
L 12/30/2014 - 11:00:39: [sb_bans.smx] Failed to verify the ban: Unknown column 'steam' in 'field list'
L 12/30/2014 - 11:00:40: [sb_bans.smx] Failed to verify the ban: Unknown column 'steam' in 'field list'

Dust server (palaganza.game.nfoservers.com)
No errors

both servers have the identical Database.cfg file.

"sourcebans"
{
"driver" "mysql"
"host" "awpwnage2.site.nfoservers.com" // The host where your mysql server is located
"database" "awpwnage2_sourcebans" // The name of the database
"user" "awpwnage2" // The name of the user that the plugin should use to connect
"pass" "xxxxxxxx" // The password for this user
"port" "3306"

}

Any suggestions?
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Installing Sourcebans

Post by soja »

sb_bans.smx is the 2.0 plugin, and not compatible with 1.4.11. You should only use sourcebans.smx

Can you please add me on steam so I can take a look at your database structure?
Not a NFO employee
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

Soja thank you so much for taking the time to help me out!!!

Feel a little silly but I was using the wrong *.smx file on the server. Got it all working now. :D

But since I have got you here is there any way of importing my ban list showing what admin banned whom.
I am having trouble importing the sourcemod/logs/bans.log into sourcebans.

I tried cstrike/cfg/banned_user.cfg but it only showed steam id and the fact that there was a ban but no info as to what admin and what reason.
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Installing Sourcebans

Post by soja »

I don't think there would be a way to automatically import bans to sourcebans, because of the way sourcebans stores the information, which is aid(admin id) bid(ban id) and not normal steam ids.

The best way to do it would be manually adding your previous bans in. Any future bans should have the banning admin etc.
Not a NFO employee
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

:D
Image
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

How do I prevent sourcebans from overwriting my admins.cfg?

this is what I have now

// Enable backing up config files after getting admins from database (1 = enabled, 0 = disabled)
"BackupConfigs" "1"

// Enable admin part of the plugin (1 = enabled, 0 = disabled)
"EnableAdmins" "1"

no matter what I do it keeps overwriting admins.cfg.

Is there a way to access sourcebans permissions in game, I tried !admin but that doesn't work.
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Installing Sourcebans

Post by soja »

Sourcebans overwrites admins.cfg, that's how it is meant to work.

Sourcebans is meant to manage all of your admins, their groups, which servers they have access to, etc.

If you want to override sourcebans, you can use admins_simple.ini.
Not a NFO employee
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

So then all admin functions are done via the website or is there a way to enable "sourcebans admin" in-game?
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Installing Sourcebans

Post by soja »

You make admin groups on the website, add admins to the website, then assign admins to the groups and servers. Sourcebans will then sync your admins to your servers so they can use their permissions in-game.
Not a NFO employee
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

Thanks for your help Soja have it working flawlessly now, but do you think that sourcebans lags the server. My server has been seen some lag lately can't really figure out why, other than possibly sourcebans.
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Installing Sourcebans

Post by soja »

It is possible that when sm_rehash is ran it could cause a small lag spike on your server. Try changing this to 0 in your sourcebans.cfg (located in /csgo/addons/sourcemod/configs/sourcebans)

Code: Select all

"BackupConfigs"	"0"
Not a NFO employee
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

Getting some errors can't figure out why.

L 05/03/2015 - 08:57:32: SourceMod error session started
L 05/03/2015 - 08:57:32: Info (map "de_dust") (file "errors_20150503.log")
L 05/03/2015 - 08:57:32: [admin-sql-prefetch.smx] Could not connect to database "default": [2003]: Can't connect to MySQL server on 'localhost' (10061)
L 05/03/2015 - 08:57:33: [admin-sql-prefetch.smx] Could not connect to database "default": [2003]: Can't connect to MySQL server on 'localhost' (10061)
L 05/03/2015 - 08:57:33: [admin-flatfile.smx] Error(s) detected parsing addons\sourcemod\configs\admins.cfg
L 05/03/2015 - 08:57:33: [admin-flatfile.smx] (line 0) Stream failed to open
L 05/03/2015 - 08:57:34: [admin-sql-prefetch.smx] Could not connect to database "default": [2003]: Can't connect to MySQL server on 'localhost' (10061)
Image
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Installing Sourcebans

Post by soja »

Did you overwrite your databases.cfg recently during a sourcemod upgrade?

Your server is trying to contact a database on localhost, based on the previous posts in this thread that would be incorrect.
Not a NFO employee
Bigsplash
A semi-regular
A semi-regular
Posts: 29
Joined: Mon Dec 01, 2014 10:32 am

Re: Installing Sourcebans

Post by Bigsplash »

This is what I have, can you see anything wrong with this?


"Databases"
{


"driver_default" "mysql"

// When specifying "host", you may use an IP address, a hostname, or a socket file path

"default"
{
"driver" "default"
"host" "localhost"
"database" "sourcemod"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}


"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}

"clientprefs"
{
"driver" "sqlite"
"host" "localhost"
"database" "clientprefs-sqlite"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}



"sourcebans"
{
"driver" "mysql"
"host" "xxxx.com"
"database" "palaganza_sourceb"
"user" "xxxxxxx"
"pass" "xxxxxx"
//"timeout" "0"
"port" "3306"
}
"sourcecomms"
{
"driver" "mysql"
"host" "xxxxx.com"
"database" "xxxx_sourceb"
"user" "xxxxx"
"pass" "xxxxxxxx"
//"timeout" "0"
"port" "3306"
}

"store"
{
"driver" "mysql"
"host" "xxxxx.com"
"database" "xxxx_store"
"user" "xxxxxx"
"pass" "xxxxxxx"
//"timeout" "0"
"port" "3306"
}

"CallAdmin"
{
"driver" "mysql"
"host" "xxxx.com"
"database" "xxxxx_calladmin"
"user" "xxxxx"
"pass" "xxxxxx"
//"timeout" "0"
"port" "3306"
}
}
Image
Post Reply