ULX

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

0 Members and 3 Guests are viewing this topic.

Offline thegtz

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
Re: Sourcebans & ULX/ULib
« Reply #15 on: December 13, 2012, 06:02:08 PM »
L 12/13/2012 - 19:50:48: [ULX] Coolstevie approved the voteban against Pablo Escobar (30 minutes) (reason)
L 12/13/2012 - 19:50:48: Lua Error: addons/ulx/lua/includes/modules/sourcebans.lua:274: string expected, got no value

addons/ulx/lua/includes/modules/sourcebans.lua:274: string expected, got no value
L 12/13/2012 - 19:50:48: "Pablo Escobar<14><STEAM_0:0:49314557><>" disconnected (reason "Vote ban successful. (reason)")
Dropped Pablo Escobar from server (Vote ban successful. (reason))

Offline centran

  • Newbie
  • *
  • Posts: 43
  • Karma: 8
Re: Sourcebans & ULX/ULib
« Reply #16 on: December 13, 2012, 10:57:56 PM »
was there anymore lines for the error? usually there is a trace of where the error occurred and then what functions where called.

I think it might be because there is no reason given. Try adding this to line 273 of addons/ulx/lua/includes/modules/sourcebans.luasourcebans.lua
Code: [Select]
reason = reason or "";

Offline thegtz

  • Newbie
  • *
  • Posts: 25
  • Karma: 0
Re: Sourcebans & ULX/ULib
« Reply #17 on: December 14, 2012, 01:18:04 AM »
Is getting the message normal? I get it like every 5 minutes.

[12/13/12 13:01:28][SourceBans.lua] The server has lost connection to the database. Retrying...

Offline centran

  • Newbie
  • *
  • Posts: 43
  • Karma: 8
Re: Sourcebans & ULX/ULib
« Reply #18 on: December 14, 2012, 10:03:19 AM »
You shouldn't be getting it that often. MySql will close a connection after many hours of inactivity not minutes.
Did you set up your mysql DB yourself? Sounds like the timeout might have been shortened.

Offline Mors Quaedam

  • Newbie
  • *
  • Posts: 30
  • Karma: 1
Re: Sourcebans & ULX/ULib
« Reply #19 on: December 14, 2012, 03:30:48 PM »
One problem - All my bans from the three GMod servers are being classed as banned from TF2. Any solution?

Offline centran

  • Newbie
  • *
  • Posts: 43
  • Karma: 8
Re: Sourcebans & ULX/ULib
« Reply #20 on: December 14, 2012, 05:37:19 PM »
One problem - All my bans from the three GMod servers are being classed as banned from TF2. Any solution?

You probably have the wrong server ID in your sourcebans config file. That or you didn't set the server up right in sourcebans.

Offline PAL-18

  • Full Member
  • ***
  • Posts: 142
  • Karma: 1
Re: Sourcebans & ULX/ULib
« Reply #21 on: December 19, 2012, 01:55:09 PM »
I'm having a problem with getting this to load.  I get the following error in server console despite the files (and sql module) existing in the directories:

Quote
Couldn't include file 'includes/modules/sourcebans.lua' (File not found) (@addon
s/ulx/lua/ulx/modules/sourcebans_init.lua (line 5))
Couldn't include file 'includes/modules/sourcebans.lua' (File not found) (@addon
s/ulx/lua/ulx/modules/sourcebans_init.lua (line 5))

[ERROR] addons/ulx/lua/ulx/modules/sourcebans_init.lua:5: Module not found!
  1. require - [C]:-1
   2. unknown - addons/ulx/lua/ulx/modules/sourcebans_init.lua:5
    3. include - [C]:-1
     4. unknown - addons/ulx/lua/ulx/init.lua:28
      5. include - [C]:-1
       6. unknown - addons/ulx/lua/ulib/modules/ulx_init.lua:2
        7. include - [C]:-1
         8. unknown - addons/ulib/lua/ulib/init.lua:75
          9. include - [C]:-1
           10. unknown - addons/ulib/lua/autorun/ulib_init.lua:3


[ERROR] addons/ulx/lua/ulx/modules/sourcebans_init.lua:5: Module not found!
  1. require - [C]:-1
   2. unknown - addons/ulx/lua/ulx/modules/sourcebans_init.lua:5
    3. include - [C]:-1
     4. unknown - addons/ulx/lua/ulx/init.lua:28
      5. include - [C]:-1
       6. unknown - addons/ulx/lua/ulib/modules/ulx_init.lua:2
        7. include - [C]:-1
         8. unknown - addons/ulib/lua/ulib/init.lua:75
          9. include - [C]:-1
           10. unknown - addons/ulib/lua/autorun/ulib_init.lua:3

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Sourcebans & ULX/ULib
« Reply #22 on: December 19, 2012, 03:25:42 PM »
As a base you will want to install the sourceban module found here http://lexi.org.uk/modules/sourcebans.lua
Create the following directory and place the file in there. addons/ulx/lua/includes/modules/
Are you SURE you got all the files, and followed the instructions for what lines to edit/replace within sourcebans.lua?

That error you post seems to indicate you don't have it in the right place, or if you do, didn't follow the rest of his instruction for editing and creating a config file.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline centran

  • Newbie
  • *
  • Posts: 43
  • Karma: 8
Re: Sourcebans & ULX/ULib
« Reply #23 on: December 19, 2012, 03:45:31 PM »
Make sure sourcebans.lua is going in addons/ulx/lua/includes/modules
and sourcebans_init.lua is going in addons/ulx/lua/ulx/modules/
Quote
Couldn't include file 'includes/modules/sourcebans.lua' (File not found) (@addon
s/ulx/lua/ulx/modules/sourcebans_init.lua (line 5))
That is the problem right there. File not found. It isn't finding the main sourcebans module. You either forgot to add that or put it in the wrong dir or maybe you misspelled a dir name?
« Last Edit: December 19, 2012, 03:50:40 PM by centran »

Offline PAL-18

  • Full Member
  • ***
  • Posts: 142
  • Karma: 1
Re: Sourcebans & ULX/ULib
« Reply #24 on: December 19, 2012, 03:51:39 PM »
Cool, it works! Thanks :3

I messed up the paths  :-[

EDIT: It loads but its not working.  I banned myself from the Sourcebans website and i was able to connect to server.  Then i banned myself through ULX (after doing the edits to replace ULX ban function with Sourceban function) and the Sourcebans website didnt show my ban.

SQL ports are working because on the same box, my other servers use Sourcebans with no problem.
« Last Edit: December 19, 2012, 04:04:12 PM by PAL-18 »

Offline NaRyan

  • Newbie
  • *
  • Posts: 39
  • Karma: 1
Re: Sourcebans & ULX/ULib
« Reply #25 on: December 20, 2012, 04:14:59 AM »
Got it working on my servers ok. (TTT & The Stalker)
However there is one big problem, Voteban will cause the server to crash.

Every time a voteban is made and passes the server will crash with this error.

Quote
12:05:16 [ULX] Mr.Zerhot approved the voteban against muymakina (280 minutes) (ghosting)
12:05:16 Lua Error: addons/ulx/lua/includes/modules/sourcebans.lua:272: string expected, got no value

Guessing that is more of a Sourcebans problem though, since line 272 needs the info for the Admin who done the ban.
And since it is a donator on the server and not a server Admin then there is no Admin info for them in the Sourcebans setup.

Offline centran

  • Newbie
  • *
  • Posts: 43
  • Karma: 8
Re: Sourcebans & ULX/ULib
« Reply #26 on: December 20, 2012, 08:13:19 AM »
Got it working on my servers ok. (TTT & The Stalker)
However there is one big problem, Voteban will cause the server to crash.

Every time a voteban is made and passes the server will crash with this error.

Guessing that is more of a Sourcebans problem though, since line 272 needs the info for the Admin who done the ban.
And since it is a donator on the server and not a server Admin then there is no Admin info for them in the Sourcebans setup.

Try changing lin 272 to
Code: [Select]
local adminID, adminIP = getAdminDetails(admin) or "";

Offline centran

  • Newbie
  • *
  • Posts: 43
  • Karma: 8
Re: Sourcebans & ULX/ULib
« Reply #27 on: December 20, 2012, 08:20:18 AM »
Cool, it works! Thanks :3

I messed up the paths  :-[

EDIT: It loads but its not working.  I banned myself from the Sourcebans website and i was able to connect to server.  Then i banned myself through ULX (after doing the edits to replace ULX ban function with Sourceban function) and the Sourcebans website didnt show my ban.

SQL ports are working because on the same box, my other servers use Sourcebans with no problem.

You sure it is loading? You should see in console it says [SourceBans.lua] Starting the database. and then when you connect it should show all the admins you have in sourcebans being loaded.

Any errors in the console you can see?

Offline NaRyan

  • Newbie
  • *
  • Posts: 39
  • Karma: 1
Re: Sourcebans & ULX/ULib
« Reply #28 on: December 20, 2012, 12:37:25 PM »
Try changing lin 272 to
Code: [Select]
local adminID, adminIP = getAdminDetails(admin) or "";

I take it ya ment line 270 as it is the line that says
Code: [Select]
local adminID, adminIP = getAdminDetails(admin);
I changed that to
Code: [Select]
local adminID, adminIP = getAdminDetails(admin) or "";
And done a voteban against myself, I was banned from the server (Lan one), however it still gave the error.
Quote
Lua Error: addons/ulx/lua/includes/modules/sourcebans.lua:272: string expected, got no value

The server did not crash, however as I said it was just a lan based one so it was only me on it, so the lack of 23 other players might have had something to do with that.
It also did not write the ban to sourcebans (it writes them fine using !ban)

Offline PAL-18

  • Full Member
  • ***
  • Posts: 142
  • Karma: 1
Re: Sourcebans & ULX/ULib
« Reply #29 on: December 20, 2012, 12:41:10 PM »
You sure it is loading? You should see in console it says [SourceBans.lua] Starting the database. and then when you connect it should show all the admins you have in sourcebans being loaded.

Any errors in the console you can see?

Yes its loading, it says starting the database and im even able to use sm_ban.  But no bans are being read or written to the database.