ULX

Author Topic: [GitHub] ULX Global Ban (0.5Beta)  (Read 20759 times)

0 Members and 1 Guest are viewing this topic.

Offline bcool

  • Newbie
  • *
  • Posts: 3
  • Karma: 2
[GitHub] ULX Global Ban (0.5Beta)
« on: December 06, 2012, 12:43:39 AM »
ULX-Global-Ban
==============
A Global Ban System designed to be used only with ULX & ULib Garry's Mod servers.
This addon literally does not require any editing of ULX / ULib, just place into your addons folder and set up the configuration file!

INFO
==============
Created out of necessity.
Created by NigNog (Bcool) and Adobe Ninja.

FEATURES
==============
Server Identification: When your server starts, it checks to see whether or not the IP:Port configuration is already there. If it's not it'll create it and assign the server an ID. If it is it'll assign the server an existing ID.

Bans: This addon overwrites the exists ULib function to add a ban, and inserts it into the MySQL Database.

Authentication: When the server Auths a player, the point where the SteamID is retrived and the normal ban status is checked, this addon checks the MySQL server to see if the user has been banned.

Information: When a user has been banned, their SteamID, Current Name, Reason, ServerID of the server which they where banned on, Admin(Banner) SteamID and Current admin name are all saved in the MySQL Database.
Each time your server is started, the hostname is automagicly updated in the MySQL database.

PLANED/TODO
==============
Nothing

CHANGELOG
==============
[ADD]    Ban removal.
[ADD]   Ban Modification.
[ADD]    Ban listing in the xgui menus.
[ADD]   Ban sync, your bans defaulty sync with the MySQL DB every 30 seconds.
[ADD]   Config file with a small amount of configs for extra control.
[ADD]   Limited GateKeeper functionality. (Doesn't really work yet)
[FIX]     Permanently Banned users could still get through.
[CHG]   SQL Table Structure to incorporate all ULX ban details.

INSTALLATION
==============
*Requires MySQLOO
TODO

Feel free to request features / post constructive criticism, or help out with the code!

https://github.com/bcool/ULX-Global-Ban


Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
« Last Edit: December 07, 2012, 07:04:11 PM by bcool »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: [GitHub] ULX Global Ban
« Reply #1 on: December 06, 2012, 05:00:01 AM »
Very nice! And I'm a fan of your license choice. :)
Experiencing God's grace one day at a time.

Offline bcool

  • Newbie
  • *
  • Posts: 3
  • Karma: 2
Re: [GitHub] ULX Global Ban
« Reply #2 on: December 07, 2012, 07:02:16 PM »
Very nice! And I'm a fan of your license choice. :)

Why thank you good sir!

Just updated to 0.5Beta :)

Offline Q4-Bi.

  • Newbie
  • *
  • Posts: 3
  • Karma: 2
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #3 on: December 23, 2012, 09:32:12 PM »
For the people whom arn't following the project on Github, this project is now on 0.6. Simple fixes were done to the code and he fixed SQL injections.

For my self i decided to create a skin for the bans page, as the default one is, let me say it un professional.

Demo: http://ban-hammer.net/ban/
Download Link: http://www.mediafire.com/?jw9pcxdh76replx
Note: This is source code for the online template and not the addon source.
« Last Edit: December 23, 2012, 09:36:33 PM by Q4-Bi. »

Offline mikey

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #4 on: December 26, 2012, 07:44:45 PM »
First, the SQL file is setup wrong. ServerIP appears to not have correct type, integer shouldn't be so.

Secondly, Once that is fixed...
...ulx_globalbanmodule/lua/globalban/gb_serverheartbeat.lua:40: attempt to concatenate global 'GB_SERVERID' (a nil value)
I can't seem to fix this.


Database is setup correctly, the addon appears to agree.

[ULX GB] - Database Connection Successful


Any help?

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #5 on: January 02, 2013, 01:53:41 AM »
I'm getting the same error, but also when it prints message
Code: [Select]
[ULX GB] - Database Connection Restarted

it actually breaks the server, like a little windows screen pops up saying "srcds.exe has stopped working"

but before it does that, it says in console
Code: [Select]
[ULX GB] (BanStatus) - Error: [Query:1ACCA850]
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline thegtz

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #6 on: January 11, 2013, 03:36:33 PM »
How do I add servers or does it do that for me automatically?

Offline Eccid

  • Full Member
  • ***
  • Posts: 115
  • Karma: 11
  • Hey, come on... We just met...
    • Terror Abound! Steam Group
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #7 on: January 15, 2013, 11:12:57 PM »
-Snip-
« Last Edit: January 18, 2013, 08:25:34 AM by Eccid »

Offline Eccid

  • Full Member
  • ***
  • Posts: 115
  • Karma: 11
  • Hey, come on... We just met...
    • Terror Abound! Steam Group
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #8 on: January 17, 2013, 05:56:58 AM »
Ok, I got it now. I did not realise it was going to delete all my previous bans, or I would have backed the file up :( The latest backup of my server my host has is a week old.
« Last Edit: January 18, 2013, 08:26:23 AM by Eccid »

Offline Moka

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #9 on: January 30, 2013, 04:46:50 PM »
I can get this to connect to my DB but after a player joins it errors out with the UpdateNames Query error then it shows all the other Query errors and around 1 min later the server restarts.

It loads when the server starts and it creates and loads the server info but its just when the player spawns it just goes crazy.

Offline Marmaduke

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #10 on: February 02, 2013, 07:20:34 AM »
With this mod the player has to load into the server before they get kicked.

ULX by itself will kick people from the server the moment they try to connect.

How do I change this?

Offline bcool

  • Newbie
  • *
  • Posts: 3
  • Karma: 2
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #11 on: February 03, 2013, 08:33:49 PM »
I can get this to connect to my DB but after a player joins it errors out with the UpdateNames Query error then it shows all the other Query errors and around 1 min later the server restarts.

It loads when the server starts and it creates and loads the server info but its just when the player spawns it just goes crazy.

Are you sure the server is connected to the database correctly? If it was it shouldn't error out on anything.

With this mod the player has to load into the server before they get kicked.

ULX by itself will kick people from the server the moment they try to connect.

How do I change this?

ULX smartly utilises the source engine banning system using tables and the banned_user.cfg file, I found it was easier to load the table and create my own auth system. The only difference is that you annoyed the banned users more, which I quite enjoy personally!

Ok, I got it now. I did not realise it was going to delete all my previous bans, or I would have backed the file up :( The latest backup of my server my host has is a week old.

So sorry!! I really should add that as a warning!


First, the SQL file is setup wrong. ServerIP appears to not have correct type, integer shouldn't be so.

Secondly, Once that is fixed...
...ulx_globalbanmodule/lua/globalban/gb_serverheartbeat.lua:40: attempt to concatenate global 'GB_SERVERID' (a nil value)
I can't seem to fix this.


Database is setup correctly, the addon appears to agree.

[ULX GB] - Database Connection Successful


Any help?

Getting the host / ip in Garry's mod is given as a string, so I inserted it as one.
Your server either can't select the ServerID from the database or it doesn't have permissions.


FYI: I look at the facepunch thread more that I do here! http://facepunch.com/showthread.php?t=1231554

Offline SuperAero_

  • Newbie
  • *
  • Posts: 13
  • Karma: 1
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #12 on: April 24, 2013, 05:39:51 PM »
Still Working?

Offline Eccid

  • Full Member
  • ***
  • Posts: 115
  • Karma: 11
  • Hey, come on... We just met...
    • Terror Abound! Steam Group
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #13 on: April 29, 2013, 07:35:37 AM »

Offline Th3_§mp3r0r

  • Newbie
  • *
  • Posts: 10
  • Karma: 1
Re: [GitHub] ULX Global Ban (0.5Beta)
« Reply #14 on: January 16, 2014, 08:25:02 AM »
Hey, sry for bumping.

Anybody have problems with that addon? I think it's broken for me.

functions are working well, but it totally up the xgui. Every list is empty (group-list, ban-list, server adverts). But they're working in the background. I can't modify the group-permissions either. From time to time it worked when i clicked the "refresh" button at Setting/Client. but right now it just does nothing.

I know this hasn't been updated for a while but it would be very nice if ther would be a way to fix it.

regards