gameconnect / sourcebans Goto Github PK
View Code? Open in Web Editor NEWAdvanced admin and ban management for the Source game engine
Home Page: http://www.sourcebans.net
Advanced admin and ban management for the Source game engine
Home Page: http://www.sourcebans.net
cs@cs:~$ git clone https://github.com/GameConnect/SourceBans
Initialized empty Git repository in /home/cs/SourceBans/.git/
remote: Counting objects: 8250, done.
remote: Compressing objects: 100% (4496/4496), done.
remote: Total 8250 (delta 3658), reused 8006 (delta 3430)
Receiving objects: 100% (8250/8250), 16.81 MiB | 6.46 MiB/s, done.
Resolving deltas: 100% (3658/3658), done.
error: refs/remotes/origin/master does not point to a valid object!
error: Trying to write ref refs/heads/master with nonexistant object eae1995
fatal: Cannot update the ref 'HEAD'.
So just got this up and running and everything works great except one little (bug?)
If I were to remove an admin from the servers (via web panel), they continue to still have admin until I manually do sm_reloadadmins or the level changes which I don't do level changes often on my server. The rehashing appears to be completed successfully, but it isn't actually reloading the server admins. Now when I add an admin it works beautifully. Any ideas?
Hey!
I recommend that you update SB to work on Bootstrap 3, it is easier to theme, contains fixes and new features.
Hi I'm currently translate sourcebans.php for koreans but main page dosen't pit with scale
here is the link when you join the site you will know what is the problems
Hi.Sourcebans game plugin (versions 1.4.10, 1.5) has problem with unstable mysql-connections.
If something breaks persistent mysql connection (from sourcemod to db) (network troubles or connection timeout for example) and sourcebans executes sql-query - then sourcemod silently reconnects to db, but doesn't execute "on connect" callback - and mysql connection - gives broken "codeset" (encoding). And then all non-asci symbols (in nickname, reason) turns to mush like Михаил Задорнов
I think you need to add checking for query and db handles are valid to query callback. And it they invalid - disconnect & connect to db.
I'm not sure if Team Fortress 2 is supported yet, but I figured it is; anyway, here is the problem I currently face.
It appears that bans do not sync correctly with the MySQL database. It will place the ban onto the MySQL saying so and so has been banned for however long the ban is; When the player tries to rejoin, it denies them as it should. Although, when the play is unbanned via the web interface, it will not sync up with the servers database saying that the player is unbanned.
I've tested this with a different server type, (CSS) and it works fine.
Field with data configuration can not apply changes. Every time it returns default value.
I can login to my administration session but when i push login button this error show up to me
PHP warning
mcrypt_create_iv() [function.mcrypt-create-iv]: Cannot open source device
C:\Web\www\sourcebans\framework\base\CSecurityManager.php(373)
361 */
362 public function generateRandomBytes($length,$cryptographicallyStrong=true)
363 {
364 $bytes='';
365 if(function_exists('openssl_random_pseudo_bytes'))
366 {
367 $bytes=openssl_random_pseudo_bytes($length,$strong);
368 if($this->strlen($bytes)>=$length && ($strong || !$cryptographicallyStrong))
369 return $this->substr($bytes,0,$length);
370 }
371
372 if(function_exists('mcrypt_create_iv') &&
373 ($bytes=mcrypt_create_iv($length, MCRYPT_DEV_URANDOM))!==false &&
374 $this->strlen($bytes)>=$length)
375 {
376 return $this->substr($bytes,0,$length);
377 }
378
379 if(($file=@fopen('/dev/urandom','rb'))!==false &&
380 ($bytes=@fread($file,$length))!==false &&
381 (fclose($file) || true) &&
382 $this->strlen($bytes)>=$length)
383 {
384 return $this->substr($bytes,0,$length);
385 }
Stack Trace
#0
I saw there's space for this in the database and SourceComms (muting/gaging) makes use of this feature. You press Ungag, enter in a reason. It's displayed. When you unban, no reason, it doesnt even say unbanned. It looks like it expired.
or add command for reloading their from database?
In some cases i wants to add new settings to database before request and access to it in the same request, but now i am getting error that "attribute XXX doesn't exists in ->settings"
Hello, I've had the community running for a few months now and recently the web interface has become very sluggish with some queries taking over 60 seconds to complete.
I have tried enabling MySQL cache (64Mb) I can't even tell if it made a difference. Sometimes the query executes fast, but most of the time they take over 60 seconds. I have checked MySQL settings and am running multiple other databases with no performance problems, and CPU usage is not a problem either.
I notice this problem when clicking on nearly any link within the web interface, but some still do work consistently however. The Header URLS (Dashboard,Bans,Servers,Report player,Appeal ban,Administration) as well as the Administration URLS (Admins,Bans,Groups,Servers,Games,Settings) certainly are affected.
The following link discusses the same problem: https://forums.alliedmods.net/showthread.php?t=233068
Would be nice if someone could have a look into this and get back with some feedback on possible causes.
Thanks in advance
I've got this error when I'm visiting the admins/settings page:
Hi. Could you describe to me, how can i determine admin's immunity level in new "sourcebans paradigma" (multi admin and server groups, no plain admin immunity) if i have admin id and server id ?
What is the purpose of the table sb_server_groups_immunity?
Would be cool if you bring examples of sql queries. (for example - how can i get ban details and admin immunity in one query?)
Hello
I've been trying to install this but I always get:
[sourcebans.smx] Failed to query database. (Unknown column 'ip' in 'where clause')
The fix which was supposed to be applied at 11.Jule isnt really applied everywhere.
The sourceban.sp file is for one isnt updated.
So here is what I did:
(While server is shutdown)
So, what is missing?
Atm, sb 2.0 game plugin has an issue with updating the actions table while trying to update a constrainted key. I had this issue when trying to get my admin rights working on my server, but later solved it without knowing how. Now someone else is having this issue.
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field 'inherit_order' doesn't have a default value. The SQL statement executed was: INSERT INTO sb_admins_server_groups
(admin_id
, group_id
) VALUES (:yp0, :yp1)
http://hootsclan.com/admin_server_group.html
Steps that I took to get this error:
That is when the error occurred.
In PHPMyAdmin, I modified the table to set the field 'inherit_order' to have a default value of 'NULL' and tried to save the user modifications and it worked.
This did allow the changes to be saved, however, the table shows the field 'inherit_order' to be set as NULL for the user.
Added a second user to verify and both users show as NULL as expected
EDIT:
Users DO NOT have access to !admin or sm_admin
L 07/04/2013 - 12:58:09: [sb_admins.smx] SQL error receiving admin: Unknown column 'ad.lastvisit' in 'where clause'
L 07/04/2013 - 12:58:09: [sb_admins.smx] Query dump: SELECT ad.id, ad.name, ad.auth, ad.identity, ad.server_password, COUNT(ag.group_id) FROM {{admins}} AS ad LEFT JOIN {{admins_server_groups}} AS ag ON ag.admin_id = ad.id LEFT JOIN {{servers_server_groups}} AS gs ON gs.group_id = ag.group_id WHERE ((ad.auth = 'steam' AND ad.identity REGEXP '^STEAM_[0-9]:1:615883$') OR (ad.auth = 'ip' AND '169.254.201.57' REGEXP REPLACE(REPLACE(ad.identity, '.', '.') , '.0', '..{1,3}')) OR (ad.auth = 'name' AND ad.identity = 'Brooklyn ๏̯͡๏ ßþ')) AND gs.server_id = 3 AND ad.lastvisit IS NOT NULL GROUP BY ad.id
Verified that 'Root Admin' was selected under 'Server Groups' in 'sourcemod_install/index.php/servers/edit/0' as well as RCON password is set
Admin information WAS NOT written to the server cstirke/sourcemod/configs/admins.cfg file
Hello! After todays update the Sourcemod, Sourcebans can't connect to the server... But Server work...
http://ns378037.ip-5-196-89.eu/sourcebans/index.php/servers#1
Where i need to find the pproblem?
//On clean installation//
On each opening (exclude first) Administration->Setting page I've got this error in application log:
2013/10/26 15:46:18 [error] [system.db.CDbCommand] CDbCommand::execute() failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'CommunityBans.CommunityBansPlugin' for key 'PRIMARY'. The SQL statement executed was: INSERT INTO sb_plugins
(status
, class
) VALUES (:yp0, :yp1).
in /home/Alex/www/SourceBans/web/application/controllers/AdminController.php (337)
in /home/Alex/www/SourceBans/web/index.php (16)
Probably you should check the plugins info before adding new or use INSERT IGNORE instead of simple INSERT.
I am trying to create a web group but it just keeps flashing blank page no matter what I set. Creating Server groups works though
This is more of concept question then anything, but why not track kicks, mutes, and gags as well? You could rename it to SourcePlayers and it would provide a complete player history, not just the bans. Even better is to add a warn system as well.
As you may know. SourceBans 2 does not look like its in alpha stage. More like Release Candidate stage.
I would like to see a Update method from 1.4.12 to 2.
Realized that this features was no longer available to check the number of times client has been banned all together. The feature was very useful in SourceBans 1.4, and hopefully it will be re-implemented in a way that can be turned on and off (Some people don't need it, and it will affect the load speed on the Bans page)
Even though the database still stores unbanned by admin, it however does not show it, so if that can be shown (maybe a toggle in the administration settings), would be wonderful.
Hi, I've downloaded and installed the latest version from GitHub, installation went perfectly, but now I can't access sm_admin even though I've set up myself as a server admin, and I'm getting these lines in the SourceMod logs:
L 04/04/2014 - 10:58:24: [sourcebans.smx] Failed to query database. (Unknown column 'ip' in 'where clause')
L 04/04/2014 - 10:58:29: [sourcebans.smx] Failed to query database. (Cannot add or update a child row: a foreign key constraint fails (sourcemod
.sb_actions
, CONSTRAINT action_server
FOREIGN KEY (server_id
) REFERENCES sb_servers
(id
) ON DELETE CASCADE))
Am I doing anything wrong, or is this a known issue?
Many thanks!
FreakySt0rm - St0rm.net Gaming
Hi, from what I see on the sourcebans 2.0 roadmap, rcon is done, but when I use the rcon page, I get internal server error. I don't got apache's error log handy atm(Will make a reply with it when I can get at it).
Apache Version: 2.4.6
Php Version(What ever one you get from install lamp server on ubuntu 13.10 with tasksel I believe)
Mysql version(Not sure if you want but here you go): 5.5(client & server)
If you need anything else where I don't need access to files on the computer apache is on, I'll try to add it(if I know off hand)
I've downloaded the dev version in November of 2013, and I was wondering if there's a way I can upgrade to the latest version of SourceBans without using a clean install.
Thanks! and please let me know!
Example of password request message:
Hello User, you have requested to have your password reset for your SourceBans account. To complete this process, please click the following link. /index.php/lostPassword?email=user%40example.com&key=5ac2b3d6443d65a32450f6fb3cb2cc3a NOTE: If you did not request this reset, then simply ignore this email.
After perusing, all I could find were these lines. I am unfamiliar with what is declared as default other than what is specified in Settings, which would be index.php (dashboard). Some help on this issue would be lovely, or perhaps this was fixed in future versions, which is incompatible atm with the plugin, so I dare not use.
web/application/models/LostPasswordForm.php:
55 Yii::app()->mailer->MsgHtml(Yii::t('sourcebans', 'models.LostPasswordForm.reset.body', array(
56 '{name}' => $admin->name,
57: '{link}' => Yii::app()->createUrl('default/lostPassword', array('email' => $admin->email, 'key' => $validationKey)),
58 )));
59 if(!Yii::app()->mailer->Send())
Hello i get the error "could not connect to server" you see it here: http://8bitzone.eu/sb/index.php
English is not my first language...
what do i have to put there?
Edit
it works if i:
Debian lamp
Why you have twice
public function hasPermission($name)
in web/application/models/SBAdmin.php,
Shoudnät it be there just one time?
For SB 2.0 users who do not want to SB for admin maintenance should have the option to disable such a feature either on install or via the plugin section
Linking a Group to a Server won't get saved in the Database
As with today's tf2 update, steamids changed to STEAM3 for tf2.
The plugin does:
LoadTranslations("sb_viewbans.phrases");
but, no such file is included in the repo.
Hello, you should make the Sourcebans more effective, make a family sharing detection.
like this.
https://forums.alliedmods.net/showthread.php?t=240626
Hallo together,
it seems that is impossible to view a uploaded demo or download it.
Further it is not possible to upload a demo while editing a ban.
After commit bcdf0c5 when i'm pressing "install" link, plugin is successfully installed, but his status doesn't changes to "installed" into db;
Something strange happens during $plugin->save();
: Before it, $plugin is:
CommunityBansPlugin#1
(
[allowDisable] => true
[CActiveRecord:_new] => false
[CActiveRecord:_attributes] => array
(
'class' => 'CommunityBans.CommunityBansPlugin'
'status' => 1
)
[CActiveRecord:_related] => array()
[CActiveRecord:_c] => null
[CActiveRecord:_pk] => 'CommunityBans.CommunityBansPlugin'
[CActiveRecord:_alias] => 't'
[CModel:_errors] => array()
[CModel:_validators] => null
[CModel:_scenario] => 'update'
[CComponent:_e] => null
[CComponent:_m] => null
)
in /home/Alex/www/SourceBans/web/application/controllers/PluginsController.php (70)
but mysql receives this query (from bin log):
UPDATE `sb_plugins` SET `class`='CommunityBans.CommunityBansPlugin', `status`=0 WHERE `sb_plugins`.`class`='CommunityBans.CommunityBansPlugin'
Did you have any ideas?
CException
Property "CAttributeCollection.enable_smtp" is not defined.
/var/www/vhosts/xx.xx.xx.xx/httpdocs/sourcebans/framework/collections/CAttributeCollection.php(51)
39 * Returns a property value or an event handler list by property or event name.
40 * This method overrides the parent implementation by returning
41 * a key value if the key exists in the collection.
42 * @param string $name the property name or the event name
43 * @return mixed the property value or the event handler list
44 * @throws CException if the property/event is not defined.
45 /
46 public function __get($name)
47 {
48 if($this->contains($name))
49 return $this->itemAt($name);
50 else
51 return parent::__get($name);
52 }
53
54 /*
55 * Sets value of a component property.
56 * This method overrides the parent implementation by adding a new key value
57 * to the collection.
58 * @param string $name the property name or event name
59 * @param mixed $value the property value or event handler
60 * @throws CException If the property is not defined or read-only.
61 */
62 public function __set($name,$value)
63 {
Stack Trace
#0
/var/www/vhosts/xx.xx.xx.xx/httpdocs/sourcebans/framework/collections/CAttributeCollection.php(51): CComponent->__get("enable_smtp")
#1
–
/var/www/vhosts/xx.xx.xx.xx/httpdocs/sourcebans/application/components/SourceBans.php(356): CAttributeCollection->__get("enable_smtp")
351 Yii::app()->setTheme(Yii::app()->user->data->theme);
352 else if(!empty(SourceBans::app()->settings->theme))
353 Yii::app()->setTheme(SourceBans::app()->settings->theme);
354
355 // Set mailer
356 if(SourceBans::app()->settings->enable_smtp)
357 {
358 Yii::app()->mailer->mailer = 'smtp';
359 Yii::app()->mailer->host = SourceBans::app()->settings->smtp_host;
360 Yii::app()->mailer->port = SourceBans::app()->settings->smtp_port;
361 Yii::app()->mailer->username = SourceBans::app()->settings->smtp_username;
#2
unknown(0): SourceBans::onBeginRequest(CEvent)
#3
/var/www/vhosts/xx.xx.xx.xx/httpdocs/sourcebans/framework/base/CComponent.php(559): call_user_func(array("SourceBans", "onBeginRequest"), CEvent)
#4
/var/www/vhosts/xx.xx.xx.xx/httpdocs/sourcebans/framework/base/CApplication.php(207): CComponent->raiseEvent("onBeginRequest", CEvent)
#5
/var/www/vhosts/xx.xx.xx.xx/httpdocs/sourcebans/framework/base/CApplication.php(178): CApplication->onBeginRequest(CEvent)
#6
–
/var/www/vhosts/xx.xx.xx.xx/httpdocs/sourcebans/index.php(16): CApplication->run()
11 defined('YII_DEBUG') or define('YII_DEBUG',true);
12 // specify how many levels of call stack should be shown in each log message
13 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
14
15 require_once($yii);
16 Yii::createWebApplication($config)->run();
2013-09-03 06:20:15 Apache Yii Framework/1.1.14
Hallo together,
I saw that isn't possible to edit a comment like in the old version.
Native_Connect native doesn't work properly to checking that sourcebans plugin is connected to db if plugin successfully connected to database at start, and then database goes down.
In this case, SB_Connect still returns "true", because g_hDatabase has "valid" value.
For example, I added this code to Query_ExecuteCallback:
PrintToServer("EXECUTE CALLBACK: hDatabase %d, owner %d, hndl %d, error: %s", g_hDatabase, owner, hndl, error);
I start game server with sourcebans, and then - stop mysql server and join to server. I get in server console:
EXECUTE CALLBACK: hDatabase 9502860, owner 12517521, hndl 0, error: Can't connect to MySQL server on '127.0.0.1' (111)
And later, each SB_Connect call returns true, with this error. This is not the expected behavior.
It will be great (for properly SB_Connect working), if you add to sourcebans plugin native, that can manually close g_hDatabase handle and set g_iDatabaseState to DatabaseState_None). Or you can add this functionality to ExecuteCallback (check hndl for zero value, but hndl equals to zero even for sql syntax errors :( )
Demo files can become quite large. Compressing uploaded files using gzip or even xz would be amazing.
Title explains all.
Hello together,
I saw that the calculation of the demo size is wrong
Displayed in Backend: 437.07 KB
Folder: 230 MiB
If a web ban by SteamID is issued, GeoIP will magically take the admin's IP instead of the player's(because the latter's IP is missing). Can be solved by putting
if (empty($this->ip))
{
return (object)array(
'code' => 'unknown',
'name' => 'Unknown'
);
}
at the top of getCountry()
in SBBan.php
.
Hi,
the import bans function is not working properly. I've put 200 SteamID's for testing into a file, like this:
banid 0 STEAM_0:1:123456
banid 0 STEAM_0:1:246810
etc...
It just imports the last ban of the file and there are no errors :P
Receiving this error after adding or editing:
Fatal error: Undefined class constant 'SBLog::INFORMATION_TYPE' in /public_html/bans/application/components/SourceBans.php on line 303
When i push Settings, Plugins, Logs, nothing happen :|
No error, nothing
http://gladiatori-bucuresti.ro/bans/index.php/admin/settings
and when i press:
http://gladiatori-bucuresti.ro/bans/index.php/admin/settings#settings
SB 2.0 will obviously break SC. So then SC will need a rewrite, more db migration, and a whole bunch more script patching. Server owners will then need to decide to drop SC functionality and migrate to SB 2.0 or wait months for the SC rewrite and migrate everything from 1.x at that time. Today the forum stats show about 8% (432/5733) of SB servers already running SourceComms and another 470 servers running extendedcomm. It would save a ton of development effort and operator time to do this inevitable merge of these projects now and have an all-in-one regulation system.
look at the title
Missing folders like :
Assets Folder Writable (/assets)
Demo Folder Writable (/demos)
Runtime Folder Writable (/application/runtime)
Missing files like:
Database Config Writable (/application/config/sourcebans.php)
The problem is not in my git. Here is the example.
cs@cs:~$ git clone https://github.com/GameConnect/SourceBans
Initialized empty Git repository in /home/cs/SourceBans/.git/
remote: Counting objects: 8250, done.
remote: Compressing objects: 100% (4496/4496), done.
remote: Total 8250 (delta 3658), reused 8006 (delta 3430)
Receiving objects: 100% (8250/8250), 16.81 MiB | 7.32 MiB/s, done.
Resolving deltas: 100% (3658/3658), done.
error: refs/remotes/origin/master does not point to a valid object!
error: Trying to write ref refs/heads/master with nonexistant object eae1995
fatal: Cannot update the ref 'HEAD'.
cs@cs:$ git clone https://github.com/eggheads/eggdrop-1.8$
Initialized empty Git repository in /home/cs/eggdrop-1.8/.git/
remote: Reusing existing pack: 1478, done.
remote: Total 1478 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1478/1478), 1.61 MiB | 1.22 MiB/s, done.
Resolving deltas: 100% (905/905), done.
cs@cs:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.