Ulysses

Ulysses Stuff => Releases => Ulysses Release Archives => Topic started by: Neubivljiv on April 17, 2014, 05:05:53 AM

Title: OpenSteam: Bans and User Management System
Post by: Neubivljiv on April 17, 2014, 05:05:53 AM
OpenSteam: Bans and User Management System

This project includes Lua and web application (written in php). Based on ULX MySQL.

Require:
mysqloo
webserver (mysql with php/PDO enabled)

Features:
- Each player is added to the database
- It is not necessary for a player to be on a server in order to execute a command (for example, you can add/remove/update admin although he is not on the server, playing...same for bans/removing bans)
- Check user from the database (steamID, status etc)
- Temporary bans
- Login via Steam (web)
- Custom loading screen (with caching steam players and random backgrounds)
- Support multiple servers
- GeoIP support (based on GeoIP Locator (http://www.garrysmod.org/downloads/?a=view&id=95994)
- Country Bans

Installation
- Copy SERVER /opensteam.lua to GAMEROOT/garrysmod/addons/ulx/lua/ulx/modules/sh/
- Copy WEB folder to your public html folder on the webserver
- Open config.php and modify the settings for your database
- Open opensteam.lua and change (to match your database):
local ULX_HOST = "127.0.0.1"
local ULX_PORT = 3306
local ULX_DATABASE = "prop_hunt"
local ULX_USERNAME = "root"
local ULX_PASSWORD = "password"
- Create database (use Database.sql)
- Add in your server.cfg the following:
Code: [Select]
sv_loadingurl "http://YOUR_WEBSITE/loading/?mapname=%m&steamid=%s"(note: change YOUR_WEBSITE to match yours)
- Edit loading/index.php
Change [SERVER NAME HERE] to Your server name and {YOUR SERVER #1 IP HERE} to your server IP. (I will add option to setup this via configuration later). If you know html, css you can easily create your own loading screen.

It is possible to add more images for loading screen. Just put them into /loading/bcg folder.
To add yourself as admin, join the game and type:
rcon_password YOUR_RCON_PASSWORD
rcon ulx updateuser STEAM_{your_steamID} superadmin
(if you don't know your SteamID use ulx sid YourNick)

In fact, Installation is simple. I just wrote too much detail.  :)

GeoIP Install:
Go to MaxMind (http://dev.maxmind.com/geoip/legacy/geolite/) website and download GeoIPCountryCSV.zip
Unpack zip archive to /garrysmod/data folder

Commands:

ulx banuser <SteamID> <ban time in minutes (default: 7200 min.)> <Ban Reason (optional)>
ulx removeban  <SteamID> Remove banned user from the database
ulx updateuser <SteamID> <group: supeadmin, admin, user> Promote/demote user
ulx sid <Player Name> Get user SteamID from the database by name
ulx showgroups Show all groups from the database
ulx checkban Check if player is banned (by Player name)
ulx showplayers Show all players with their entity index in console
ulx banindex <Index separated with comma> <Ban time> <"Reason"> Quickly ban more than one player

All these options are also available through the web application  (and more). It is possible to set default expire time for the bans, and allow/disallow permanent bans.
We might add Gaming Panel (screenshot here) (https://community.slashgaming.net/uploads/monthly_04_2014/post-19-0-84898700-1397416861.jpg), which allows almost full control of the steam games via web (Linux only). Currently, this panel is integrated with our system and forums, and we may plan to do as standalone.

If user login via Steam, web application will automatically recognize him if he is superadmin or admin (or user)....

Demo: http://stats.ohsystem.net/opensteam/ (http://stats.ohsystem.net/opensteam/)

Download: https://github.com/OHSystem/opensteam (https://github.com/Neubivljiv/opensteam)

Screenshots:
Loading screen 1 (http://ohconnect.net/public_images/loading_01.jpg) | Loading screen 2 (http://ohconnect.net/public_images/loading_02.jpg) |  Edit user (http://ohconnect.net/public_images/edit_user.jpg) | Configuration (http://ohconnect.net/public_images/config.jpg) | Permissions (http://ohconnect.net/public_images/group.jpg) | Permissions2 (http://ohconnect.net/public_images/group_02.jpg) | Remote control (http://ohconnect.net/public_images/rcon_01.jpg) | GeoIP Ban (http://ohconnect.net/public_images/country_ban.jpg) | GeoIP ACP (http://ohconnect.net/public_images/country_ban_ACP.jpg)

Please check all before asking a question about database connection. If your installation of MySQLOO is not good, we do not provide support for it. So before posting, make sure that your MySQLOO is working (and without OpenSteam).

To do:
- server remote control via web (done)
- more options...
- import bans?
Title: Re: [WIP] OpenSteam and User Mangement System
Post by: Grief-Code on April 17, 2014, 05:19:38 AM
 :)
<- Other side of OHSystem :-P
Title: Re: [WIP] OpenSteam and User Mangement System
Post by: Storm on April 17, 2014, 05:32:09 AM
Just some questions- I have thousands of bans across many servers. My problem is the servers lag as a result of large banned_user.cfg and huge bans.txt files.

1)will this also record permabans to banned_user.cfg?
2)will this also record information to bans.txt?
3)how will this deal with bans across multiple servers or will it?
Title: Re: [WIP] OpenSteam and User Mangement System
Post by: Grief-Code on April 17, 2014, 05:33:23 AM
We do not deal with any stupid banned_users.cfg's (this is literally outdated, slow, reading require a lot of time (what is causing your laggs) and not modern)  :-)

We are writing all into MySQL, a database which can be light fast on correctly setup indexe's.
No more laggs from reading large files ;-)
Furthermore, diffrent servers also on diffrent locations can share one database which allow shared bans actually and a shared user statistics/database.

Regards
Title: Re: [WIP] OpenSteam and User Mangement System
Post by: Neubivljiv on April 17, 2014, 05:51:49 AM
Quote
1)will this also record permabans to banned_user.cfg?
No, record permabans is done only through the database.

Quote
2)will this also record information to bans.txt?
No.

Quote
3)how will this deal with bans across multiple servers or will it?
Depends on how you've set in Lua. I do not see why someone set the different databases for each server. So that the system natively supports multiple servers.
Title: Re: [WIP] OpenSteam and User Mangement System
Post by: Neku on April 17, 2014, 01:48:39 PM
I do not see why someone set the different databases for each server.

When you host multiple servers, you wouldn't want one ban database for all of them.

It may seem convenient, but in reality, it would only cause grief to those who were banned by an abusive admin or otherwise banned for a bad reason.
Title: Re: [WIP] OpenSteam and User Mangement System
Post by: Neubivljiv on April 17, 2014, 03:53:30 PM
I agree. After all, this option is optional and can easily be adjusted as needed (just need to change the data for database or table in which are placed bans via lua config for each server).
Title: Re: [WIP] OpenSteam and User Mangement System
Post by: Mclovin on April 17, 2014, 07:25:17 PM
This looks awesome, well done!
Title: Re: [WIP] OpenSteam and User Mangement System
Post by: Neubivljiv on April 18, 2014, 09:46:59 AM
First version (download...read first post):
https://github.com/Neubivljiv/opensteam
(I will probably move to https://github.com/OHSystem later)

I plan to add more options and features, as well as remote control of server (rcon query)...may make and statistics.
Title: Re: OpenSteam and User Mangement System
Post by: Storm on April 18, 2014, 10:35:38 AM
This looks incredible!
Title: Re: OpenSteam and User Mangement System
Post by: Bytewave on April 18, 2014, 10:40:58 AM
It seems Bootstrap is a goto framework for a lot of global ban related utilities, these days. I applaud it, personally, as it makes customization and retheming much easier. :D
I do have a few questions, though:

Overall, this is a cool system. I can't wait to use it!
I'd rather use this than Sourcebans as:
Title: Re: OpenSteam and User Mangement System
Post by: Mclovin on April 18, 2014, 10:44:25 AM
Do you think you could also add ban reasons?
Title: Re: OpenSteam and User Mangement System
Post by: Neubivljiv on April 18, 2014, 11:11:45 AM
Quote from: Mclovin
Do you think you could also add ban reasons?
Yes, that was planned...but somehow I forgot to add.
Quote from: Princess Twilight Sparkle
Will admin groups be automatically loaded? (In the admins page, if a group inherits from admin, will it show up as its group name?) Or, is it configurable in any way?
When running commands such as sid, is the player's name searched like ULX does it where it's like a search system? (Example: !sid short would return the SteamID of Short Circuit?)
Groups are automatically loaded. However, only superadmins can modify configurations and bans. Will add more options for this.
ulx sid command return data from the database. Currently it only returns Steam ID (not Community ID), but can be easily added.
On the web you can search users by Name, SteamID, CommunityID (it will automatically recognize).

However, this is how loading screens looks like:
screen1 (http://ohsystem.net/public_images/loading_01.jpg) screen2 (http://ohsystem.net/public_images/loading_02.jpg)

Edit user: screen2 (http://ohsystem.net/public_images/edit_user.jpg)

Quote from: Princess Twilight Sparkle
Sourcebans still uses mysql_connect(); functions, when the MySQL library is deprecated as of PHP 5.5. (Hopefully you guys use MySQLi :P)
Even better. We are using Data Object (PDO).

Quote
Sourcebans 2 (built under Bootstrap) is still in early development.
Bootstrap is only template. We are using it because of responsive design.  It's easy to create a template for OpenSteam. However, I never tried and tested Sourcebans...will look into it...
Title: Re: OpenSteam and User Mangement System
Post by: Bytewave on April 18, 2014, 11:20:35 AM
Yes, that was planned...but somehow I forgot to add.Groups are automatically loaded. However, only superadmins can modify configurations and bans. Will add more options for this.
ulx sid command return data from the database. Currently it only returns Steam ID (not Community ID), but can be easily added.
On the web you can search users by Name, SteamID, CommunityID (it will automatically recognize).

However, this is how loading screens looks like:
screen1 (http://ohsystem.net/public_images/loading_01.jpg) screen2 (http://ohsystem.net/public_images/loading_02.jpg)

Edit user: screen2 (http://ohsystem.net/public_images/edit_user.jpg)
Even better. We are using Data Object (PDO).
Nice! :D
Personally, I like MySQLi, but that's just my preference.
I can't wait to see this in action and see all future updates! :D

One question, though, even though it does not concern me entirely: Will this system ever be opened for translations into other languages? Say, including a language file that contains an array of language strings and allowing for that to either be translated by hand or providing the ability to load multiple language files created by others to swap between via a dropdown menu on either the index or admin panel? That would be a very useful feature. :P
Title: Re: OpenSteam and User Mangement System
Post by: Neubivljiv on April 18, 2014, 01:15:30 PM
Quote
Personally, I like MySQLi, but that's just my preference
Well, maybe you can try PDO and like it. :)

Quote
Will this system ever be opened for translations into other languages?
Yes, you have languages in lang/ folder.  I will add dropdown so each user can change the language.
screenshot (config) (http://ohsystem.net/public_images/config.jpg)

However, added ban reason, so command is:
ulx banuser <SteamID> <BanTime> <Reason>
Example:
ulx banuser STEAM_0:0:14754067 1337 "Map Abuse" - will ban STEAM_0:0:14754067 for 1337 min. with reason: Map abuse
ulx banuser STEAM_0:0:14754067 - will permanent ban STEAM_0:0:14754067
Title: Re: OpenSteam and User Mangement System
Post by: Neubivljiv on April 18, 2014, 08:24:30 PM
Added permissions (groups) from the database:
Permissions (http://ohsystem.net/public_images/group.jpg) | Permissions2 (http://ohsystem.net/public_images/group_02.jpg)

Will update download after all tests...
Title: Re: OpenSteam and User Mangement System
Post by: Mclovin on April 19, 2014, 12:47:08 AM
If someone's ban has expired, does it get deleted or does it stay there?
Title: Re: OpenSteam and User Mangement System
Post by: Grief-Code on April 19, 2014, 06:17:49 AM
The removal is not included yet. However it doesnt count.

We may can create a ban history for users out of it, as we have on our other project we can also include penality points ;-)
There are a lot varius options we can create here.

Regards
Title: Re: OpenSteam and User Mangement System
Post by: Neubivljiv on April 19, 2014, 06:40:58 AM
Ok, added option to set Group permissions, create, edit or remove group. Group superadmin can not be changed or removed.
When group is updated or removed it's also updated on all players for that group. For example, if you change group name it will be changed on all players that is in that group automatically.

group permissions (http://ohsystem.net/public_images/group_02.jpg)
Title: Re: OpenSteam and User Mangement System
Post by: Bytewave on April 19, 2014, 07:38:26 AM
Ok, added option to set Group permissions, create, edit or remove group. Group superadmin can not be changed or removed.
When group is updated or removed it's also updated on all players for that group. For example, if you change group name it will be changed on all players that is in that group automatically.

group permissions (http://ohsystem.net/public_images/group_02.jpg)
I'd recommend a few things with that:

Also, a question- are you guys open to pull requests? I'd love to help you out if you need it. I'm good with Bootstrap and decent with PHP, so... yeh. :P[/list][/list]
Title: Re: OpenSteam and User Mangement System
Post by: Grief-Code on April 19, 2014, 09:47:21 AM
Actually we can make it configureable.

About pull request, wait for neubs reply.
I just can say that it is better to leave all design patterns for now.
Im currently working on integrate all our projects on this design pattern to globalize it, as soon as you make changes it will directly influence my work, and this can mess up all my work.

Regards

Title: Re: OpenSteam and User Mangement System
Post by: Neubivljiv on April 19, 2014, 06:09:20 PM
Quote from: Princess Twilight Sparkle
If possible, dynamically find the permissions available (added by plugins) and add those to the permissions edit.
If not possible, at least allow for configs for more permissions.
#moreconfigs (rank badges).
There is a list of commands that are used on the server. Command list can be updated. In this way, it's possible to globally remove/add a command. I still have not figured out how privileges work (inherit from other group), because it looks like to me is not working properly or probably I'm doing wrong.
After all, this system will be different and have the option to provide immunity for specific group, so players in that group will be immune to any command (this is just an idea, the question is whether it will actually be integrated). I really like how in old CS 1.6 privileges work (with AmxModx)...simple, very effective and useful.

Quote from: Princess Twilight Sparkle
Also, a question- are you guys open to pull requests? I'd love to help you out if you need it. I'm good with Bootstrap and decent with PHP, so... yeh.
Well, that's okay, but would be better if someone who knows LuA scripting,  we already have a lot of support for php/MySQL, C++ ...however, it is good to have as much support.

what is planned:
- stats
- medals/ranks/badges
- server control (rcon commands via web...I already added server management, still not updated download).

With relational databases and web applications possibilities are much greater.
Title: Re: OpenSteam and User Mangement System
Post by: Neubivljiv on April 19, 2014, 06:21:16 PM
Quote from: Mclovin
If someone's ban has expired, does it get deleted or does it stay there?
Currently, the record stored in the database, but user is not banned (ban expired). The main reason for this is that I plan to add the number of bans for players, so we can see how many times a player has been banned. So, when the ban expired, penalty point remains.
Title: Re: OpenSteam and User Mangement System
Post by: Bytewave on April 19, 2014, 08:29:05 PM
Well, that's okay, but would be better if someone who knows LuA scripting,  we already have a lot of support for php/MySQL, C++ ...however, it is good to have as much support.
I do know enough Lua to get by, same with PHP, CSS, and HTML. :P
Title: Re: OpenSteam and User Mangement System
Post by: Grief-Code on April 19, 2014, 09:59:42 PM
As said PHP, CSS, HTML is not wanted ;-)
Title: Re: OpenSteam and User Mangement System
Post by: Bytewave on April 20, 2014, 05:12:55 AM
As said PHP, CSS, HTML is not wanted ;-)
Well remember...
I do know enough Lua to get by

:P

But anyway, meh. I'm also curious (haven't read the license yet xD): How free are we to modify the code present? I have a custom Bootstrap theme my site uses and, seeing as you guys based this on TWBS, I want to modify this to fit my site's theme. Just curious as to what extent we can go without voiding anything.
I'll look at the license though. :P
Title: Re: OpenSteam and User Mangement System
Post by: Grief-Code on April 20, 2014, 06:49:56 AM
The current license was picked due the fact that we saw from our other projects that many people using our code without leaving any kind of credits. You, Princess Twilight Sparkle, have our permission (included in the license!) to change the theme in your mind AS LONG AS you keep footer credits which definitely link to us directly. This is the general reason for this license, we want people to respect our work and keep credits. But you need also to state that this is a work in progress, we might can decide in some days to fully change the whole templating and CSS usages. If you have any further questions, do not hesitate to ask again.

Also we have actually split our whole system to a MVC model (nearly), the idea is you can simple copy paste 'default' folder in opensteam/WEB/themes/ and simple rename it and create in this folder your whole own template. Which can be later handled as pull request.
I know there some things which are globalized handled in inc/common.php, however I will soon start to exclude it and have it fully in the theme folder. But for this i need to finish first my other work on our other project :-)


Edit:
And your site is very slow.... ~25 seconds to load. Im not sure if this is my location or whatever.

Small speedtest from global location (NY City) = 34.19s
Tested our site once from the same location = 1.25s
Used: http://tools.pingdom.com/fpt/ (http://tools.pingdom.com/fpt/)

Just as suggestion, first fix and manage your site, and then you can create a template (no offense here, just facts :-P)
Then we should be in the process where we wont change design and further things :-)


Best Regards,
Grief-Code
Title: Re: OpenSteam and User Mangement System
Post by: Bytewave on April 20, 2014, 09:39:30 AM
-snip-
And your site is very slow.... ~25 seconds to load. Im not sure if this is my location or whatever.
-snip
Hmmm... most likely location- Dallas, TX, USA (my location) gets about a 1s response time.
EDIT: Weird- could be our host is screwing up. I'll talk to them.
EDIT 2: Weeeeiiiirdd... this is the traceroute I'm getting using tracert in Windows...
Code: [Select]
Tracing route to ponypwnage.net [83.253.91.106]
over a maximum of 100 hops:

  1     1 ms     1 ms    <1 ms  192.168.1.254
  2    22 ms    23 ms    21 ms  108-79-32-3.lightspeed.rcsntx.sbcglobal.net [108.79.32.3]
  3    23 ms    21 ms    23 ms  70.143.193.44
  4    21 ms    22 ms    22 ms  12.83.80.161
  5    25 ms    22 ms    22 ms  ggr3.dlstx.ip.att.net [12.122.138.17]
  6    26 ms    21 ms    21 ms  192.205.37.50
  7   125 ms    66 ms    66 ms  nyk-bb1-link.telia.net [213.155.133.176]
  8   149 ms   149 ms   147 ms  kbn-bb1-link.telia.net [80.91.249.25]
  9   159 ms   159 ms   159 ms  s-bb3-link.telia.net [80.91.246.106]
 10   160 ms   159 ms   159 ms  s-b5-link.telia.net [62.115.137.159]
 11   167 ms   167 ms   170 ms  comhem-ic-118784-s-b3.c.telia.net [213.248.99.86]
 12   167 ms   166 ms   166 ms  83.255.253.205
 13   191 ms   193 ms   189 ms  sv-bb-r-01-to-mx-bbr-2.comhem.se [83.255.252.52]
 14   180 ms   184 ms   185 ms  osk-bb-r-01-to-sv-bb-r-01.comhem.se [83.255.252.50]
 15   176 ms   182 ms   185 ms  83.255.251.161
 16     *        *        *     Request timed out.
 17     *        *        *     Request timed out.
 18     *        *        *     Request timed out.
 19     *        *        *     Request timed out.
 20     *        *        *     Request timed out.
 21     *        *        *     Request timed out.
 22     *        *        *     Request timed out.
 23     *        *        *     Request timed out.
 24     *        *        *     Request timed out.
 25     *        *        *     Request timed out.
 26     *        *        *     Request timed out.
 27  ^C
--Broke here because I hit something... huh.--
No idea what I hit around hop 16. I'll have to check with my provider on that one.
Title: Re: OpenSteam and User Mangement System
Post by: Bytewave on April 20, 2014, 09:43:21 AM
You, Princess Twilight Sparkle, have our permission (included in the license!) to change the theme in your mind AS LONG AS you keep footer credits which definitely link to us directly.
-snip-
Sweet, good to know! Thanks! :D
Title: Re: OpenSteam and User Mangement System
Post by: Grief-Code on April 20, 2014, 10:39:24 AM
Yea I was just interested how the theme would look like, so I looked it up. I first thought its my location which occur that problem so I did a speed test. ;-)
Title: Re: OpenSteam and User Mangement System
Post by: Neubivljiv on April 20, 2014, 10:40:51 AM
Of course, feel free to add "Template by" or "Template modification" or whatever you want in footer.

However, I added server remote control and server list (with server query from steamAPI). Now it's possible to include banned message on loading screen for banned players.

server info (http://ohsystem.net/public_images/servers.jpg) | server rcon (http://ohsystem.net/public_images/rcon_01.jpg)
Title: Re: OpenSteam and User Mangement System
Post by: Bytewave on April 20, 2014, 10:58:24 AM
Yea I was just interested how the theme would look like, so I looked it up. I first thought its my location which occur that problem so I did a speed test. ;-)
Apparently it's my and my lead web developer's PHP skills. xD
I'll check for infinite loops- our host says it's our code, which I can definitely agree with. :P
Quote
Short Circuit: Dude
Short Circuit: the site
Short Circuit: is slower than the old host
Short Circuit: wat
LordNature: You <censor>ed something up
LordNature: [10:50 AM] <host>: Well something is up with your code
EDIT: We know the host semi-personally, which would explain the Skype convo. :P
Title: Re: OpenSteam and User Mangement System
Post by: Bytewave on April 20, 2014, 11:00:35 AM
Of course, feel free to add "Template by" or "Template modification" or whatever you want in footer.
I will most likely- though mostly it's just Yeti on Bootswatch with a modded CSS scheme, but meh.

However, I added server remote control and server list (with server query from steamAPI). Now it's possible to include banned message on loading screen for banned players.
server info (http://ohsystem.net/public_images/servers.jpg) | server rcon (http://ohsystem.net/public_images/rcon_01.jpg)
Nice! Looks great!
Title: Re: OpenSteam and User Mangement System
Post by: Storm on April 20, 2014, 11:18:06 AM
My situation, I have seen, is shared by many other server owners. I own a lot of gmod servers and I put my permanent bans on ALL servers (if I don't want you on one, I don't want you on any). This is extremely time consuming, as each ban has to be entered on RCON many times. Also, I have over 3000 bans on every server. There are a lot of server performance issues, as a result. Yes I have tried using MySQL database addons, I even bought one but they all had problems and didn't work right. Your project could very well be the answer to my prayers!!! I can't wait to see it! The only issue I can think of is that many of us have multiple gamemodes and the admins vary from gamemode to gamemode (someone who is qualified to admin Murder may not be right to admin TTT, for example.) Will you be able to use the banning part of this and not the staff-syncing part? Also, will this upload existing bans from ulx?
Title: Re: OpenSteam and User Mangement System
Post by: Grief-Code on April 20, 2014, 11:25:20 AM
This can be of course split as well :-)
As you notes this modification can solve all your problems in one. We are not interested in creating a single application which is functional. You can find a lot of these. We want a highly performanced and optimized scripting which covers all the issues also for a huge platform.

You say 3000 bans create issues? I say that I wrote partly a c++ application which can handle more than 600.000 records fast and efficiency, as well as neubivljiv did nearly a similar thing for PHP.

We are happy that here so many users interested in our project.

There can be shared bans/shared staff but must not. This can be implemented.
There can be also a uploaded for old bans. However this may require your help in letting is know how the current ban script looks like.

best Regards,
grief-code
Title: Re: OpenSteam and User Mangement System
Post by: Storm on April 21, 2014, 12:17:05 PM
Current permanent bans are stored in banned_user.cfg files. Is there a timeline for your work- its completion I mean?
Title: Re: OpenSteam and User Mangement System
Post by: Neubivljiv on April 21, 2014, 12:51:01 PM
If admin bans  player with a command ulx banuser it will be stored into database. Also, you can always use common command to ban user; it will work too.
 
However, in my opinion flat-file database is bad...for performance and lot's of other reasons. It's good for testing, but not for production. 

With OpenSteam database you can easily handle hundreds of thousands players and bans without huge performance impact. I also think that any addon that uses a database should use database as OpenSteam uses.
With many examples (addons?) you can see the poor structure of the database, missing indexes and invalid field types (or poor coding for web app), which may also affects the performance. That's why we always take care of the database structure and performance.

There's no timeline for this project. However, OpenSteam can already be used and in time we add a new features.
Title: Re: OpenSteam and User Mangement System
Post by: Bytewave on April 21, 2014, 01:55:41 PM
Suggestion: Ban requests/appeals.
Specifics: In game command for ban requests if no admins are online ("ulx reqban <steamid/name> <reason>" as an example). Web interface for appeals/requests. (If possible) Notify admins via notification on home page or in e-mail (add interface for admins to link e-mail to account and add interface/config for linking an IMAP or SMTP server to send e-mails [maybe? :3])
Reason: As a server owner I find it very difficult to keep up with ban requests and rule breakers. Having a utility such as this would definitely help!

If this gets added, that'd be cool! :D
Title: Re: OpenSteam and User Mangement System
Post by: Neubivljiv on April 21, 2014, 02:07:14 PM
Can be done.

I am currently working on GeoIP, so it will inform people about connecting players (can be disabled), and option to ban entire country or IP Range.

About ulx reqban can be done, but whether it will be useful? I mean, admin can see the request, but how knows what happened on the server or if the application is false. It will just take admins time.

However, forum is an good solution for ban appeals/requests.
Title: Re: OpenSteam and User Mangement System
Post by: Grief-Code on April 21, 2014, 10:40:13 PM
Is there a timeline for your work- its completion I mean?

There's no timeline for this project. However, OpenSteam can already be used and in time we add a new features.

For now I can add a timeline about the process what were done already, and a list of features planed soon. I can make a small hint how long each feature need and a small preview when the patches are done. Im planing anyway to create a new Home Page where this can be put easily on a nice graph.

Suggestion: Ban requests/appeals.
Specifics: In game command for ban requests if no admins are online ("ulx reqban <steamid/name> <reason>" as an example). Web interface for appeals/requests. (If possible) Notify admins via notification on home page or in e-mail (add interface for admins to link e-mail to account and add interface/config for linking an IMAP or SMTP server to send e-mails [maybe? :3])
Reason: As a server owner I find it very difficult to keep up with ban requests and rule breakers. Having a utility such as this would definitely help!

If this gets added, that'd be cool! :D
We had a simlair system on OS where everyone could amke ban requests/appeals. It was made back in tiem by Neubivljiv, after we started to work together and started with hosting aswell we also used the forum for it. Its more prefereable and also for this kind of requests etc, how are you able to proof it?
On a forum you can simple bring up evidence in form of screenshots.

Regards
Title: Re: OpenSteam and User Mangement System
Post by: Neubivljiv on April 22, 2014, 08:36:22 AM
Added GeoIP (Ban Country).

Install:
Go to http://dev.maxmind.com/geoip/legacy/geolite/ (http://dev.maxmind.com/geoip/legacy/geolite/) and download Download "GeoIPCountryCSV.zip
Unpack zip archive to /garrysmod/data folder
(GeoIP is based on some addon...can't find link, but I will update it in the first post when I find)

Soon I will add Join/Leave message (eg. Player joined from COUNTRY)

Screenshots:
GeoIP Ban (http://ohsystem.net/public_images/country_ban.jpg) | GeoIP ACP (http://ohsystem.net/public_images/country_ban_ACP.jpg)
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on April 22, 2014, 05:04:14 PM
Why would anyone want to ban everyone form a country?
Title: Re: OpenSteam: Bans and User Management System
Post by: JamminR on April 22, 2014, 08:30:31 PM
Why would anyone want to ban everyone form a country?
Illegal immigration wastes country's resources?
Oh, wait, you're talking in Gmod.
Yeah, it's Gmod and the Interwebs, could be any personal reason.
Title: Re: OpenSteam: Bans and User Management System
Post by: Grief-Code on April 22, 2014, 10:35:43 PM
Why would anyone want to ban everyone form a country?

Simple. As soon as you start a huge hosting platform you will notice diffrent things.
Specific countries have huge amount of hackers, game destorying & spamming. In other games leaving aswell. And yea you can simple relate it to countries.
On our other project, at WC3, you can simply group people like this:
Russian -> Hackers/Cheater
Kazastahn -> Leaver
etc.
In some cases this make a lot of sense to ban specific countries.
This option is as called an option, you dont need to use it :-)

Regards
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on April 23, 2014, 12:44:17 AM
Quote
Why would anyone want to ban everyone form a country?
What question is that? :) Why you even want to ban anyone? :)
However, maybe somebody want private server and allow only players from specific country, or you have multiple offenders from specific country.
When you have over 5.000 players per day on server, you can easily see why this can be very usefull option as well as ip range ban...
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on April 24, 2014, 04:00:59 AM
I would like to start using this but, as I said, I am afraid of losing all my current bans. Is there a way currently to migrate current bans from banned_user.cfg or is that a future option? I know I asked this before but I was confused about your answer, sorry.

 If there is, can you tell me how to do that? Also, if I just want to use the permissions I have on each server for staff, is there a way to turn off that option in your system?

 I assume the loading screen doesn't have to be used if we have a custom one?

 Another thing that is stopping me (and others might have this concern) is that I am rather a MySql noob :-[ .
Title: Re: OpenSteam: Bans and User Management System
Post by: Grief-Code on April 24, 2014, 04:15:31 AM
I would like to start using this but, as I said, I am afraid of losing all my current bans. Is there a way currently to migrate current bans from banned_user.cfg or is that a future option? I know I asked this before but I was confused about your answer, sorry.
Currently you wouldnt loose the bans, but there is atm no way to import bans, this can be added as feature soon.
If there is, can you tell me how to do that? Also, if I just want to use the permissions I have on each server for staff, is there a way to turn off that option in your system?
What do you mean exactly by that? Global permissions for each staff member or certain for specific servers?
I assume the loading screen doesn't have to be used if we have a custom one?
You dont need to use our loading screen, it can be disabled i think
Another thing that is stopping me (and others might have this concern) is that I am rather a MySql noob :-[ .
You dont need to have any knowledge about MySQL :-) You only need to set up the MySQL database and create a user for it. The rest is done through the panel.

Regards
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on April 24, 2014, 04:18:24 AM
You can use bans simultaneously from banned_user.cfg  and MySQL. But if you have a lot of bans it's better to import all bans into MySQL.
Therefore, this system does not exclude the option to ban as before. It will work too.
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on April 24, 2014, 06:23:54 PM
Well that's great if i can just keep my banned_user.cfg bans and start doing the new bans on this new system! Then I can just wait until an import feature is added and move them! As far as the permissions go, I have a lot of addons with different permissions for different levels of staff. I also have 5 different gmod gamemodes with different addons and different staff on each gamemode. So it just sounds easier if I keep that at a server level on each server and not in MySql?
Title: Re: OpenSteam: Bans and User Management System
Post by: Grief-Code on April 24, 2014, 11:12:02 PM
It sounding easier to keep it like current.
But you need to see the future, its just one time a bit work and that makes life actually easier :-P

- You can directly administrate usergroups by simple log in through a web page
- You can change permissions from everywhere
- You can easily add new groups
- You can promote/demote players directly be review their profile
- You have a staff list to review your staff directly
- Public players can review the staff list aswell

Regards
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on April 25, 2014, 04:25:57 AM
Are the commands such as ulx banuser actually listed in the ulx menu and you ban from there? Can you use the commands from rcon with hlsw? Will this system do my laundry too? Seems it does everything else!
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on April 25, 2014, 07:03:15 AM
You can use commands from rcon
(http://ohsystem.net/public_images/com_01.jpg)

Keep in mind that this system uses MySQL database, so that the command is not currently displayed via ulx menu. The reason for this is that you can use OpenSteam commands when the target user is not on the server and also you can use web interface, which is advantage. I'll see if it is possible to display data from database via ulx menu, but I am not currently working with it.

Also, I've added an option to ban user via web by getting data from steam (adding user/admin is also possible), so you can manage all without connecting to server.
Ban user web (http://ohsystem.net/public_images/ban_player.jpg)

I'll probably soon add an option to import all bans via banned_users.cfg into database.
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on April 25, 2014, 10:35:10 AM
Thanks I am starting to understand this much better. So say one of my moderators (without access to the website or rcon) sees a mass rdmer on TTT and needs to quickly ban them to get them off the server. How does he actually do that?
Title: Re: OpenSteam: Bans and User Management System
Post by: Grief-Code on April 25, 2014, 12:20:08 PM
There is an rcon command which can directly kick a player from the server from the website. Next stimple use the ban as shown on the console = banned & kicked.

(http://ohsystem.net/public_images/rcon_01.jpg)
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on April 25, 2014, 12:48:59 PM
I am currently working on a commands for quick ban players. It will work like this:
ulx showplayers (will show all players sorted by entity index)
1. Player1 (STEAM_0:0:xxxxx)
2. Player2 (STEAM_0:0:xxxxx)
3. Player3 (STEAM_0:0:xxxxx)
4. Player4 (STEAM_0:0:xxxxx)
5. Player5 (STEAM_0:0:xxxxx)


Now you want to quick ban players 2, 4 and 5 with single command. It will be:
ulx banindex 2 4 5 <BAN_TIME> <REASON>

However, I updated table structure, so now banned IP Address is also checked.
Title: Re: OpenSteam: Bans and User Management System
Post by: Decicus on April 25, 2014, 01:01:45 PM
While I don't necessarily find use of this system now, I like how it looks so far with the features. Nice work.
I'll be happy to provide Norwegian translations for this. I know you have the 'lang' folder for the web interface, so I'll just do a pull request or something (I haven't used git too much, so I don't really know what I'm talking about) eventually.
Title: Re: OpenSteam: Bans and User Management System
Post by: Grief-Code on April 25, 2014, 01:17:43 PM
Sounds already good.

Basically: Fork, create the new file, make a remote pull request.
If you have any questions do not hesitate to ask me about details ;-)

Regards
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on April 25, 2014, 04:16:30 PM
File updated (added ulx banindex command). To get player entity index type ulx showplayers.
Result:
Index PLAYERNAME SteamID
Index PLAYERNAME SteamID
Index PLAYERNAME SteamID

Usage:
ulx banindex Index BanTime "Ban Reason"
Example:
ulx banindex 1,3,5 1050 "Test ban"
Will ban players with index 1,3 and 5 for 1050 min. with reason "Test ban"

I think that in this way you can more quickly ban multiple players at once than with ulx menu.
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on April 26, 2014, 03:24:37 AM
So it sounds like rcon access is needed by moderators/admins, etc to ban players or no?
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on April 26, 2014, 06:54:50 AM
No, rcon access is not needed for this, but commands that you can set on group/permissions page (http://ohsystem.net/public_images/group_02.jpg). Just call console with tilda (~) (default) and use commands.
Title: Re: OpenSteam: Bans and User Management System
Post by: Decicus on April 26, 2014, 09:08:55 AM
Sounds already good.

Basically: Fork, create the new file, make a remote pull request.
If you have any questions do not hesitate to ask me about details ;-)

Regards
I think I did this right, at least I did some sort of pull request.
Title: Re: OpenSteam: Bans and User Management System
Post by: Grief-Code on April 26, 2014, 10:24:15 PM
Yea all is fine :-)
Title: Re: OpenSteam: Bans and User Management System
Post by: matthall on April 27, 2014, 01:31:21 PM
This looks like a great addon, except for a couple issues.

Commands. I should be able to use ulx adduser, ban, banid etc

I could learn to use these commands but the problem is other admins. I don't feel like re-training admins, plus, due to habit, seasoned admins will forget and use the standard commands, causing a mess of the bans. For example, ULX Global Ban [0.5] does this. It makes it seamless for players, only the server operators would know of the change.

Also, I think it is preventing XGUI from editing user permissions.

If these issues can be fixed, I will use this system.

Title: Re: OpenSteam: Bans and User Management System
Post by: RalphORama on May 01, 2014, 02:49:28 PM
When I go to the webpage I have this installed on, I get the following screen:
(http://puu.sh/8viFZ/a1230db18b.png)

No CSS, nothing. Is there something I'm doing wrong here?
Title: Re: OpenSteam: Bans and User Management System
Post by: Neku on May 01, 2014, 02:51:48 PM
Clear your internet cache.
Title: Re: OpenSteam: Bans and User Management System
Post by: RalphORama on May 01, 2014, 02:56:43 PM
Clear your internet cache.
Didn't work. Same thing happens on other browsers as well (IE, Chrome, and WaterFox)

EDIT: in config.php I had my website as 'http://bans.corerp.co (http://bans.corerp.co)' but changing it to 'http://bans.corerp.co/' (http://bans.corerp.co/') fixed it
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on May 01, 2014, 03:01:59 PM
Open config.php and change:
$cfg["website"]
to match your website.
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on May 02, 2014, 04:29:13 AM
I have to agree with Matthall. Admins without rcon access need an easier way to ban. Opening the console means you briefly can't see what is happening on the server and is a cumbersome way to ban. And yes my admins will use the old way too when they need to quickly ban. I would then have to move all those bans to the database daily (which I don't yet know how to do).
Title: Re: OpenSteam: Bans and User Management System
Post by: RalphORama on May 02, 2014, 07:06:02 PM
On the OpenSteam site I've created, at http://bans.corerp.co/?option=login (http://bans.corerp.co/) I get the following error:
Notice: Undefined index: openid_signed in /home/nginx/bans.corerp/inc/steam_class.php on line 54 (note that this is obscured by the header navbar)
I haven't touched any of the files, save for the required configuration. This error is preventing me from logging into the site with Steam altogether.
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on May 02, 2014, 08:04:41 PM
There seems to be a problem with Steam service (I noticed yesterday too).
See file in attachement.

However, I planned to separate admin account with steam service.

About GUI...there is plan to do (display all data from the database via ulx menu or similiar command), but currently nothing I can not promise.  I think that every admin should use the console, but it depends on habits. However, there is a great advantage of using a database.
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on May 02, 2014, 08:13:01 PM
Quote from: matthall
...seasoned admins will forget and use the standard commands, causing a mess of the bans. For example, ULX Global Ban [0.5] does this.

Didn't tested that addon, but I looked into code (a bit). Then I saw this:
Code: [Select]
ULX_DB:query("SELECT * FROM bans ORDER BY BanID DESC")It's pretty bad, especially when you have a lot of bans. This can drastically affect the performance of the server, and the query time is constantly repeated. Realistically, there's no point then use the database with this. 
Then back to the same issues: http://forums.ulyssesmod.net/index.php/topic,7224.msg36417.html#msg36417 (http://forums.ulyssesmod.net/index.php/topic,7224.msg36417.html#msg36417)

I might add a graphical interface in one of the next version, similar to that on the website, only in the game (ulx menu or similiar command like ulx banmenu)...
Title: Re: OpenSteam: Bans and User Management System
Post by: RalphORama on May 02, 2014, 08:32:29 PM
There seems to be a problem with Steam service (I noticed yesterday too).
I don't think it's that, it's an issue with the file itself. Where did steam_class.php come from? It looks like something from the steam web API, but I can't find any files with similar contents.

On the other hand, I'm also getting the following error on the server itself (during startup):
Code: [Select]
[ERROR] addons/ulx/lua/ulx/modules/sh/opensteam.lua:41: attempt to index local 'queryQ' (a nil value)
  1. fn - addons/ulx/lua/ulx/modules/sh/opensteam.lua:41
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183

[ERROR] addons/ulx/lua/ulx/modules/sh/opensteam.lua:41: attempt to index local 'queryQ' (a nil value)
  1. fn - addons/ulx/lua/ulx/modules/sh/opensteam.lua:41
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183

Again, the only part I've modified reads as follows (and all the DB information is correct):
Code: [Select]
local ULX_HOST = "localhost"
local ULX_PORT = 3306
local ULX_DATABASE = "<removed>"
local ULX_USERNAME = "<removed>"
local ULX_PASSWORD = "<removed>"
local ULX_BANS_TABLE    = "dr_bans"
local ULX_PLAYERS_TABLE = "dr_users"
local ULX_GROUPS_TABLE  = "dr_groups"
local ULX_CONFIG_TABLE  = "dr_config"
local ULXDB
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on May 02, 2014, 08:51:12 PM
Steam class: https://developer.valvesoftware.com/wiki/Server_queries
(look at bottom - PHP library)

I see problem (fixed it). Quick fix: open inc/pages/login.php and find:
Code: [Select]
$Validate = SteamSignIn::validate();replace with
Code: [Select]
if(isset($_GET["openid_ns"])) $Validate = SteamSignIn::validate();
About other errors...do you have mysqloo installed?

Title: Re: OpenSteam: Bans and User Management System
Post by: RalphORama on May 02, 2014, 10:07:58 PM
About other errors...do you have mysqloo installed?
Yep, the addon doesn't work without it. I have the lua file in garrysmod/addons/ulx/lua/ulx/modules/sh/opensteam.lua, libmysqlclient.so.18 in my root folder (next to srcds_linux), and gmsv_mysqloo_linux.dll in garrysmod/lua/bin/.

As for logging in, I added your line of code, and while it does get rid of the error on the login page, nothing happens/changes when I log in (or try to register).
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on May 03, 2014, 03:40:47 AM
I was about to download this but saw the comment that it can cause major server lag. I probably just misunderstood the reference. Can you explain?
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on May 03, 2014, 06:19:29 AM
I am trying to install this and get this error. What am I doing wrong?

Warning: Creating default object from empty value in /usr/www/myuserid/public/WEB/inc/class.db.PDO.php on line 18
Error!: Unable to connect to the database
Title: Re: OpenSteam: Bans and User Management System
Post by: JamminR on May 03, 2014, 09:33:31 AM
I was about to download this but saw the comment that it can cause major server lag. I probably just misunderstood the reference. Can you explain?
Storm, the reference was to a query statement within another 'global' system, ULX Global Ban 0.5.

Though I know in text it's difficult to 'see' facial expressions and intent, I mean no disrespect with what I'm about to say, only concern of your possible frustration.
From reading other posts in this forum, I'm not sure your technical level of understanding would allow you to appreciate this project to it's potential, even with help from it's developers.
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on May 03, 2014, 09:50:02 AM
What did I say that would lead you to believe that? I just didnt understand the reference. I said earlier I am not well acquainted with MySQL and if you read back, I was told it isn't necessary to know it well. Do you say that because I asked about an error I received with the installation? Is the solution to the error so obvious that only I am missing it? So you can answer it, right? Is a knowledge of coding/SQL required to use this system? I own a large, popular gmod group with 12 servers and thousands of bans. Why do you think I wouldn't "appreciate" a project like this? And I am by no means frustrated. I am just asking a question to get this up and running.
Title: Re: OpenSteam: Bans and User Management System
Post by: JamminR on May 03, 2014, 09:59:27 AM
Nothing as of yet within this particular discussion, mostly what I've seen of your posts regarding other projects.
I am not saying you lack intelligence or capability to learn.
It just seems your current understanding of many of the more advanced projects you're trying to take on due to your large group/user/server ban environments make it challenging and seemingly frustrating for you.
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on May 03, 2014, 10:04:44 AM
I think the developers of this project have made things very easy and those of us who are interested in it, don't need to feel we are "taking on" anything. I am not frustrated and I have no idea why you say that. The developers have been excellent at answering the questions everyone has had. I simply got an error in the installation I am asking about. And I find your comments highly insulting. I have always felt free, up to this point, to ask questions on the Ulysses forum and ask for help. I had no idea I was being judged on my technical capabilities, as a result.
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on May 03, 2014, 12:42:35 PM
I am trying to install this and get this error. What am I doing wrong?

Warning: Creating default object from empty value in /usr/www/myuserid/public/WEB/inc/class.db.PDO.php on line 18
Error!: Unable to connect to the database
Make sure that you have PDO enabled.  Also, open config.php and modify the settings for your database (see first post - Installation)
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on May 03, 2014, 02:06:16 PM
Yes I asked my host provider how to enable PDO but they had never heard of it. Do you know how I do that? I figured that might be the problem from the error! And yes the setting are correct in config.php.

I've actually checked things many times over and just can't find the cause for this error. I thought the current version of mysqloo had PDO enabled by default anyway. Can anyone shed any light?
Title: Re: OpenSteam: Bans and User Management System
Post by: RalphORama on May 05, 2014, 05:32:26 PM
Yep, the addon doesn't work without it. I have the lua file in garrysmod/addons/ulx/lua/ulx/modules/sh/opensteam.lua, libmysqlclient.so.18 in my root folder (next to srcds_linux), and gmsv_mysqloo_linux.dll in garrysmod/lua/bin/.

As for logging in, I added your line of code, and while it does get rid of the error on the login page, nothing happens/changes when I log in (or try to register).

Another error in server console: Database Connection Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on May 05, 2014, 11:23:32 PM
Your setup is not valid.

Check local ULX_HOST...try with '127.0.0.1'
Title: Re: OpenSteam: Bans and User Management System
Post by: Storm on May 06, 2014, 07:11:06 AM
I have the database up and running fine and it's registering ph_users. I just can't seem to connect to the website. I have checked config.php and it is corrrect. I believe PDO is enabled by default in the current version of mysqloo. But I am still getting this error. Any thoughts?

Warning: Creating default object from empty value in /usr/www/xxxxuserid/public/WEB/inc/class.db.PDO.php on line 18
Error!: Unable to connect to the database
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on May 06, 2014, 03:14:14 PM
You are getting this message because:
you have not PDO enabled or you did not setup config.php (wrong db_username, password or database) or you don't have database (or tables) created.

$cfg["server"]    = 'localhost'; // do not change...test with this
$cfg["username"]  = 'root';   // make sure this is correct
$cfg["password"]  = 'password'; // make sure this is correct
$cfg["database"]  = 'prop_hunt'; //make sure you have this database and all tables (executed sql data from Database.sql)
Title: Re: OpenSteam: Bans and User Management System
Post by: Dunkstormen on July 08, 2014, 03:16:50 PM
[ERROR] addons/opensteam/lua/opensteam/os_mysqloo.lua:25: attempt to index local 'queryQ' (a nil value)
1. fn - addons/opensteam/lua/opensteam/os_mysqloo.lua:25
2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
Title: Re: OpenSteam: Bans and User Management System
Post by: Decicus on July 08, 2014, 03:28:20 PM
[ERROR] addons/opensteam/lua/opensteam/os_mysqloo.lua:25: attempt to index local 'queryQ' (a nil value)
1. fn - addons/opensteam/lua/opensteam/os_mysqloo.lua:25
2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
I don't know if this is it, but are you using the most updated mysqloo? http://facepunch.com/showthread.php?t=1357773 (http://facepunch.com/showthread.php?t=1357773)
Title: Re: OpenSteam: Bans and User Management System
Post by: Dunkstormen on July 08, 2014, 03:44:08 PM
I don't know if this is it, but are you using the most updated mysqloo? http://facepunch.com/showthread.php?t=1357773 (http://facepunch.com/showthread.php?t=1357773)


Seem's not to solve the problem. i get the same error as before
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on September 19, 2014, 01:01:47 AM
Please check all before asking a question about database connection. If your installation of MySQLOO is not good, we do not provide support for it. So before posting, make sure that your MySQLOO is working (and without OpenSteam).
;)
Title: Re: OpenSteam: Bans and User Management System
Post by: StrayanDropbear 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
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv 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.
Title: Re: OpenSteam: Bans and User Management System
Post by: StrayanDropbear on September 20, 2014, 02:41:48 PM
doesn't seem to change it, i'm using MySQL server on windows
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv 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).
Title: Re: OpenSteam: Bans and User Management System
Post by: StrayanDropbear 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?
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv 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.
Title: Re: OpenSteam: Bans and User Management System
Post by: StrayanDropbear 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
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv on September 20, 2014, 03:20:53 PM
Forgot last update. There:

https://github.com/OHSystem/opensteam/commit/b0ad791d792bf120821df6855cc8ad7976ad2a16
Title: Re: OpenSteam: Bans and User Management System
Post by: StrayanDropbear 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
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv 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;
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv 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. ;)
Title: Re: OpenSteam: Bans and User Management System
Post by: StrayanDropbear on September 20, 2014, 03:34:06 PM
woops sorry didn't see you edited database.sql
Title: Re: OpenSteam: Bans and User Management System
Post by: StrayanDropbear 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 (http://puu.sh/bHbVa/04b37b3a53.png)
Title: Re: OpenSteam: Bans and User Management System
Post by: Neubivljiv 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.
Title: Re: OpenSteam: Bans and User Management System
Post by: UnpronounceableWords 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?
Title: Re: OpenSteam: Bans and User Management System
Post by: happyman0073 on October 16, 2014, 02:41:51 PM
I'm  not usually that incompetent but may soembody please help me installing MySQL00? I'm just too stupid to get it working (running my Gameserver via a Host on Debian)
Title: Re: OpenSteam: Bans and User Management System
Post by: happyman0073 on October 16, 2014, 11:12:04 PM
nevermind, idk how i got it to work but i did
Title: Re: OpenSteam: Bans and User Management System
Post by: fatguy1121 on November 21, 2014, 02:27:47 PM
Im having issues with the user being added to the group on the server... It checks to see if the user is in a group fine but everyone stays in the "user" group regardless of whether it found them already in the database as an admin or superadmin. Writing new entries to the database work completely fine, and everything seems to be working completely fine without any errors... Any ideas?

I tried EVERYTHING with a completely fresh install of ULX and ULIB, im using http://facepunch.com/showthread.php?t=1357773 (http://facepunch.com/showthread.php?t=1357773) as my mysqloo module for Gmod, It works fine for the Pointshop.. do I have to use the older 8.0 version? if so, I cant get the files for it.

I also checked to see if PDO was enabled, im using WAMP, so I checked and PDO is enabled for both mysql and mysqlite.

Note: Bans are however working correctly... could it be because im not using the loading screen provided?
Title: Re: OpenSteam: Bans and User Management System
Post by: TiBarification on November 30, 2014, 06:53:37 AM
How can i add admin without installing on server this addon. Anyone have SQL Query?
Title: Re: OpenSteam: Bans and User Management System
Post by: ???BMG|XBC4001 on December 15, 2014, 07:58:54 PM
Could someone please help with this ASAP i'v tied like everything cant get this fixed makes no sence

Warning: include(inc/Hook.php): failed to open stream: No such file or directory in C:\xampp\htdocs\opensteam\inc\common.php on line 5

Warning: include(): Failed opening 'inc/Hook.php' for inclusion (include_path='C:\xampp\php\pear') in C:\xampp\htdocs\opensteam\inc\common.php on line 5

Warning: include(inc/default-constants.php): failed to open stream: No such file or directory in C:\xampp\htdocs\opensteam\inc\common.php on line 6

Warning: include(): Failed opening 'inc/default-constants.php' for inclusion (include_path='C:\xampp\php\pear') in C:\xampp\htdocs\opensteam\inc\common.php on line 6
Title: Re: OpenSteam: Bans and User Management System
Post by: JamminR on December 16, 2014, 03:53:08 PM
Been long time, but seems to me, if you open common.php in a text editor and look at lines 5 and 6, it will tell you something that's missing from your install.
That first post has many instructions, including some requirements (such as GeoIP).
Anything missing, and you're going to get errors.
Title: Re: OpenSteam: Bans and User Management System
Post by: thegtz on December 23, 2014, 01:17:38 AM
Is this system still being updated as I am looking for a alternative to ULX Global Bans which hasn't been updated in awhile.
Title: Re: OpenSteam: Bans and User Management System
Post by: IAmClassical on January 26, 2015, 06:28:02 PM
I get this error in console when I try "rcon ulx updateuser <My ID> superadmin":
Code: [Select]
[ERROR] addons/opensteam/lua/opensteam/os_mysqloo.lua:343: attempt to index local 'queryQ' (a nil value)
  1. call - addons/opensteam/lua/opensteam/os_mysqloo.lua:343
   2. __fn - addons/ulib/lua/ulib/shared/commands.lua:943
    3. unknown - addons/ulib/lua/ulib/shared/commands.lua:1296
     4. unknown - lua/includes/modules/concommand.lua:69
My mysqloo version is 8.1. Any fixes?