Author Topic: Sourcebans & ULX/ULib  (Read 113528 times)

0 Members and 4 Guests are viewing this topic.

Offline DarkPacifist

  • Newbie
  • *
  • Posts: 5
  • Karma: 2
  • A fail lua scripter
Re: Sourcebans & ULX/ULib
« Reply #60 on: January 22, 2013, 01:22:48 PM »
ok... after alot of trial error and scrapping I finally got it working on both the gameserver and webpanel but now they just don't like communicating

http://mindthemod.x10.mx/bans/index.php?p=servers

Can anyone point what I did wrong (odds are its something simple I missed...) D:

I have gatekeeper, mysqloo, and the lua shown assaigned as directed in OP.

in sourcebans_init.lua
sourcebans.SetConfig("hostname", "198.91.81.2");       -- Database Hostname
sourcebans.SetConfig("username", "mindthem_sban");            -- Database Login name
sourcebans.SetConfig("password", "****");                -- Database Login Password
sourcebans.SetConfig("database", "mindthem_sb");      -- Database 'database' or 'schema' selection
sourcebans.SetConfig("dbprefix", "_sb");           -- Prefix for tables in the database.
sourcebans.SetConfig("portnumb", 3306);                -- Database Port number
sourcebans.SetConfig("serverid", 1);                 -- The ID given to this server by the SourceBans website
sourcebans.SetConfig("website", "www.mindthemod.x10.mx/bans");
sourcebans.SetConfig("showbanreason", true);
sourcebans.SetConfig("dogroups", false);             -- Set user groups or not.
sourcebans.Activate();
« Last Edit: January 22, 2013, 01:49:09 PM by DarkPacifist »

Offline Sidewaykill

  • Newbie
  • *
  • Posts: 8
  • Karma: 2
Re: Sourcebans & ULX/ULib
« Reply #61 on: January 22, 2013, 01:48:44 PM »
Simple. http://sourcebans.net/node/25
You have to ask your webhost to open port 27045 TDP and UDP. It is likely they will not do that, as I had to find another host for sourcebans. I recommend doctormckay.com.

Offline Sidewaykill

  • Newbie
  • *
  • Posts: 8
  • Karma: 2
Re: Sourcebans & ULX/ULib
« Reply #62 on: January 22, 2013, 01:50:41 PM »
Yes. I said when I delete or unban from sourcebans it seems ULX still keeps the ban, so it is a problem with this module.

Offline DarkPacifist

  • Newbie
  • *
  • Posts: 5
  • Karma: 2
  • A fail lua scripter
Re: Sourcebans & ULX/ULib
« Reply #63 on: January 23, 2013, 09:18:36 PM »
Unless I'm mistaken the bans in ulx are not normally updated when banning/unbanning from other "banning utilities"
I'm gunna see if I can run into the same issue so I can start looking into a solution eitherway it may be a little while before a solution is added/submitted.

Offline centran

  • Newbie
  • *
  • Posts: 43
  • Karma: 8
Re: Sourcebans & ULX/ULib
« Reply #64 on: January 24, 2013, 07:49:08 AM »
Unless I'm mistaken the bans in ulx are not normally updated when banning/unbanning from other "banning utilities"
I'm gunna see if I can run into the same issue so I can start looking into a solution eitherway it may be a little while before a solution is added/submitted.

I believe if you  try to unban someone through the sourcebans web gui that the ban will still show in ulx until it expires. However, the person still should be able to join the server as sourcebans. I have banned myself and unbanned myself in sourcebans and was able to join the server fine. Like someone already said, double check that the rcon password is correct in sourcebans.
So, it even though it still shows up in the ban menu of xgui that player should still be able to join if you unban them through the sourcebans web gui.

Offline ZephyrWarrior

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Sourcebans & ULX/ULib
« Reply #65 on: January 28, 2013, 12:31:59 PM »
Is there a way to make the web panel display the name of the admin that banned them from in game? Right now no matter who bans someone the web panel says, "CONSOLE".

Also, on line 178 of \addons\ulx\lua\includes\modules\sourcebans.lua, how do I make the server display that message when it kicks someone that has already been banned, instead of, "You have been banned from this server."? I had it working for a bit and then it stopped.
« Last Edit: January 28, 2013, 01:02:02 PM by ZephyrWarrior »

Offline centran

  • Newbie
  • *
  • Posts: 43
  • Karma: 8
Re: Sourcebans & ULX/ULib
« Reply #66 on: January 29, 2013, 06:48:28 AM »
Did you make the change to sourcebans.lua to allow all admins regardless of what server you put them in to be loaded? Sounds like you didn't make that change or if you didn't want to that you don't have any admins added in the web panel to your ttt server.

As for the banned message after they already have been banned I believe it is the server that displays the message so there is no way to change it that I know of. The user never actually connects if they are already banned so the sourcebans module can't re-kick them and display the appropriate message.

Offline bubblecon11

  • Newbie
  • *
  • Posts: 14
  • Karma: -1
Re: Sourcebans & ULX/ULib
« Reply #67 on: January 29, 2013, 02:31:25 PM »
For some reason, when I upload the files, using ULX or SM commands causes a client-side crash. However, nothing is showing up in the error logs.

Offline ZephyrWarrior

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Sourcebans & ULX/ULib
« Reply #68 on: February 02, 2013, 11:08:50 AM »
Client error logs or server error logs (Rcon)? Client ones don't show everything.

Offline Mindless

  • Newbie
  • *
  • Posts: 31
  • Karma: 1
Re: Sourcebans & ULX/ULib
« Reply #69 on: February 05, 2013, 08:54:59 PM »
Ehm, i'm not sure if this still works(?). I tried it on my server and when I tried to ban someone they didn't get banned. Aswell it bugged like some of my commands such as spectate etc.

Offline Sidewaykill

  • Newbie
  • *
  • Posts: 8
  • Karma: 2
Re: Sourcebans & ULX/ULib
« Reply #70 on: February 06, 2013, 03:04:35 AM »
Yeah, it still works. Add me on Steam (Sidewaykill) if you need a hand.
« Last Edit: February 06, 2013, 03:07:25 AM by Sidewaykill »

Offline Cyborg_delta1

  • Newbie
  • *
  • Posts: 8
  • Karma: 1
Re: Sourcebans & ULX/ULib
« Reply #71 on: February 18, 2013, 03:22:18 PM »
Hi all I have every set up and its saying in the server console that it has connected to the database and when I join the server I can see it has given me superadmin, when I'm in the server I do not have admin assess to the admin GUI only the guest and I can not use any ULX commands but I can use sm_csay and ban in the console any one know why it is doing this?

Also when I have banned my self and the ban has expired it wont let me back into the server even though the website say's unbanned :(
« Last Edit: February 18, 2013, 08:10:40 PM by Cyborg_delta1 »

Offline centran

  • Newbie
  • *
  • Posts: 43
  • Karma: 8
Re: Sourcebans & ULX/ULib
« Reply #72 on: February 19, 2013, 11:14:28 AM »
You still need to set yourself as admin through ulx. You will need console or rcon access and type ulx adduser <name> <group>
I believe there is a way to automatically put users in the Admin or SuperAdmin group but I never used that feature of the module nor do I even know if it works with ulx.

As to why you weren't unbanned, are you sure you have the rcon password setup correctly in sourcebans webgui?

Offline Cyborg_delta1

  • Newbie
  • *
  • Posts: 8
  • Karma: 1
Re: Sourcebans & ULX/ULib
« Reply #73 on: February 19, 2013, 09:08:42 PM »
You still need to set yourself as admin through ulx. You will need console or rcon access and type ulx adduser <name> <group>
I believe there is a way to automatically put users in the Admin or SuperAdmin group but I never used that feature of the module nor do I even know if it works with ulx.

As to why you weren't unbanned, are you sure you have the rcon password setup correctly in sourcebans webgui?

Ok never mind I have found out why it was not working. Well it was my fault rely it said I had superadmin but the group name did not match when I fixed this and did !menu I did not see any of the setting stab's and thought it was not giving me access but I also failed to notice I had access to all of the normal functions but I still could not force change the map or see the ban's list in XGUI, so I was playing with some buttons on the XGUI settings tab and found "refresh XGUI Modules" and when I hit that button it gave access to every thing the ban's tab, map changes and group settings so I have every thing working now and its loading admins from the Sourcebans Web page and there ranks :) 

If you like to do this ignore the step that tells you to replace the code in line 317 in sourcebans.lua and it should look like this

Code: [Select]
["Select Admins"] = "SELECT a.aid, a.user, a.authid, a.srv_group, a.srv_flags, a.immunity FROM %s_admins a, %s_admins_servers_groups g WHERE g.server_id = %i AND g.admin_id = a.aid";

Once you have done that you !MUST! make sure that your sourcebans server admin groups match the ulx groups i.e.

Sourcebans: Superadmin, ULX: superadmin
This will not work because the group name do not match and the names are case sensitive.

Sourcebans: admin, ULX: admin
This WILL work because the names match

Remember you can make your own group/group's but remember to change or add the group name in the groups.txt file (or do it in game) this is found at garrysmod/data/ulib/groups.txt

once you have done this you need to change the setting in the sourcebans_init.lua and change "dogroups" from false to true 

Hope this helps some of you also thank you to the ULX dev's for fixing the XGUI but what can I do to force the admins client to run the Refresh XGUI modules command when they spawn in and only run it if there an admin?
« Last Edit: February 19, 2013, 09:11:41 PM by Cyborg_delta1 »

Offline mikey

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
Re: Sourcebans & ULX/ULib
« Reply #74 on: February 25, 2013, 12:17:22 PM »
My RCON passwords are correct on Sourcebans, yet they still do not unban from the originally banned server (or any other servers they join while banned) until the ban expires.