Author Topic: OpenSteam: Bans and User Management System  (Read 54681 times)

0 Members and 1 Guest are viewing this topic.

Offline StrayanDropbear

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: OpenSteam: Bans and User Management System
« Reply #90 on: September 20, 2014, 02:18:13 PM »
hey, when i join my server i get

GetPlayerFromDB threw an error:
Field 'steamID' doesn't have a default value

Offline Neubivljiv

  • Newbie
  • *
  • Posts: 35
  • Karma: 7
    • OHSystem
Re: OpenSteam: Bans and User Management System
« Reply #91 on: September 20, 2014, 02:32:14 PM »
What database you are using?

Your database probably have enabled the sql mode, "STRICT_TRANS_TABLES".

You need to change the my.ini / my.cnf value for sql-mode to be the following:

Code: [Select]
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

and restart the server.

Offline StrayanDropbear

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: OpenSteam: Bans and User Management System
« Reply #92 on: September 20, 2014, 02:41:48 PM »
doesn't seem to change it, i'm using MySQL server on windows

Offline Neubivljiv

  • Newbie
  • *
  • Posts: 35
  • Karma: 7
    • OHSystem
Re: OpenSteam: Bans and User Management System
« Reply #93 on: September 20, 2014, 02:51:41 PM »
Sorry, I posted wrong cfg. Change to this:

Code: [Select]
sql_mode=NO_ENGINE_SUBSTITUTION
Or manually edit field steamID, click on Default and set As Default: (leave empty).

Offline StrayanDropbear

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: OpenSteam: Bans and User Management System
« Reply #94 on: September 20, 2014, 02:57:35 PM »
ok that worked thanks, also for the groups when editing in ulx does it write to sql? or is that just the web? and with addons adding more command etc, does it effect it?

Offline Neubivljiv

  • Newbie
  • *
  • Posts: 35
  • Karma: 7
    • OHSystem
Re: OpenSteam: Bans and User Management System
« Reply #95 on: September 20, 2014, 03:09:57 PM »
Yes. All commands are stored into database (and loaded when user join the server).
Note that this disable standard ulx groups ( currently looking for a better solution for this ).

If you have a new command, you need to add into list:
open inc/commands.php
and simply add command in a new line. Than update groups to use the new (non-default) commands.

I will probably change concept in the new versions, so you can insert bans into database with standard "ulx ban" or "ulx banid" command (it will use both: flat file by default and database). Also, there will be synchronization between databases (auto) on each map change (or server start), so if you have old bans in banned_users.cfg it will be added into database.

Offline StrayanDropbear

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: OpenSteam: Bans and User Management System
« Reply #96 on: September 20, 2014, 03:13:48 PM »
i seem to get this error when adding a new server:

Notice: Undefined index: enabled in /home/franke3/public_html/gmod/bans/inc/pages/admin_servers.php on line 24

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'eabled' in 'field list'' in /home/franke3/public_html/gmod/bans/inc/pages/admin_servers.php:44 Stack trace: #0 /home/franke3/public_html/gmod/bans/inc/pages/admin_servers.php(44): PDOStatement->execute() #1 /home/franke3/public_html/gmod/bans/inc/route.php(12): include('/home/franke3/...') #2 /home/franke3/public_html/gmod/bans/LOAD.php(26): include('/home/franke3/...') #3 /home/franke3/public_html/gmod/bans/index.php(2): include('/home/franke3/...') #4 {main} thrown in /home/franke3/public_html/gmod/bans/inc/pages/admin_servers.php on line 44

Offline Neubivljiv

  • Newbie
  • *
  • Posts: 35
  • Karma: 7
    • OHSystem

Offline StrayanDropbear

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: OpenSteam: Bans and User Management System
« Reply #98 on: September 20, 2014, 03:26:26 PM »
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'eabled' in 'field list'' in /home/franke3/public_html/gmod/bans/inc/pages/admin_servers.php:44 Stack trace: #0 /home/franke3/public_html/gmod/bans/inc/pages/admin_servers.php(44): PDOStatement->execute() #1 /home/franke3/public_html/gmod/bans/inc/route.php(12): include('/home/franke3/...') #2 /home/franke3/public_html/gmod/bans/LOAD.php(26): include('/home/franke3/...') #3 /home/franke3/public_html/gmod/bans/index.php(2): include('/home/franke3/...') #4 {main} thrown in /home/franke3/public_html/gmod/bans/inc/pages/admin_servers.php on line 44

i added the new files the status: shows up but still get that eror
« Last Edit: September 20, 2014, 03:28:10 PM by StrayanDropbear »

Offline Neubivljiv

  • Newbie
  • *
  • Posts: 35
  • Karma: 7
    • OHSystem
Re: OpenSteam: Bans and User Management System
« Reply #99 on: September 20, 2014, 03:29:09 PM »
You didnt update your database?

https://github.com/OHSystem/opensteam/blob/master/Database.sql#L61

You can manually add this field...or simply re-recreate your table (note that this will drop your current SERVERS table...don't worry if no data added yet):
Code: [Select]
DROP TABLE IF EXISTS `ph_servers`;
CREATE TABLE IF NOT EXISTS `ph_servers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `server_name` varchar(150) NOT NULL,
  `server_ip` varchar(20) NOT NULL,
  `server_port` varchar(16) NOT NULL,
  `server_rcon` varchar(128) NOT NULL,
  `enabled` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `server_ip` (`server_ip`,`server_port`),
  KEY `enabled` (`enabled`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;

Offline Neubivljiv

  • Newbie
  • *
  • Posts: 35
  • Karma: 7
    • OHSystem
Re: OpenSteam: Bans and User Management System
« Reply #100 on: September 20, 2014, 03:32:24 PM »
Lol...I see now (written in hurry).

This is my mistake:
https://github.com/OHSystem/opensteam/commit/c4d1e0d2d73cf2aaaa517a1fd61d3aec023cdf5e
(wrong field name)

Should work now. ;)

Offline StrayanDropbear

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: OpenSteam: Bans and User Management System
« Reply #101 on: September 20, 2014, 03:34:06 PM »
woops sorry didn't see you edited database.sql

Offline StrayanDropbear

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: OpenSteam: Bans and User Management System
« Reply #102 on: September 20, 2014, 03:47:20 PM »
ok it let me add the server but when going to "Servers" it get this
 http://puu.sh/bHbVa/04b37b3a53.png

Offline Neubivljiv

  • Newbie
  • *
  • Posts: 35
  • Karma: 7
    • OHSystem
Re: OpenSteam: Bans and User Management System
« Reply #103 on: September 20, 2014, 04:20:48 PM »
Make sure that  ip address and port are correct and make sure the ip address and port are reachable (not blocked in any firewalls).

And maybe you're probably not permitted to use sockets on your server. Check if there is any socket functions which are disabled, or contact your host and just ask.

This is up to your server.

Offline UnpronounceableWords

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: OpenSteam: Bans and User Management System
« Reply #104 on: October 03, 2014, 07:43:16 AM »
Wait, just to clear something up, Are the bans from !ban or !banid supposed to be logged too? or do i have to use the Ulx_banuser everytime?

And also, is there a way to use chattags along with this?
« Last Edit: October 03, 2014, 07:48:32 AM by UnpronounceableWords »