Author Topic: sourcebans  (Read 18830 times)

0 Members and 1 Guest are viewing this topic.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sourcebans
« Reply #15 on: March 24, 2008, 07:38:18 PM »
you are sending the server console the persons steamid, not their name/user#.

Sorry, got confused. I'm not sure I like a mod using the userid of a player to administer.
All I'd have to do to possibly get someone else banned is change my name to their playerid.
This seems like a bad idea to me.
Either way, I've corrected the script to use the userid when banning.
If it doesn't work, let me know, perhaps I should use entity id instead.
You still type in the name of the player you're wanting banned. ULX will determine if they've faked the name as a number and attempt ban/kick approprately.

and if you ban using the persons name won't it display the persons name in the ULX ban info page too?

Yes, but I thought you might want the person who banned them in the reason field for SMban logs too.
As it stands, it will always look like console banned them if not.
I've removed the banned user name.

I also noticed that you have a link on the bottom of your site for Gmod servers hosted in the UK, I have my server hosted with a company in the US that has very good servers at a low price (http://mammothgames.com), maybe you could ass that one for servers in the US. (I could give you a referral link to use if you wanted to use that :))

At one time, the UK server was giving us a free 6 man server in exchange for links.
In all honesty, we don't want more, and should actually remove those, as the UK server dissapeared long ago.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline compuwiz

  • Newbie
  • *
  • Posts: 29
  • Karma: 0
Re: sourcebans
« Reply #16 on: March 25, 2008, 04:51:54 AM »
Sorry, got confused. I'm not sure I like a mod using the userid of a player to administer.
All I'd have to do to possibly get someone else banned is change my name to their playerid.
This seems like a bad idea to me.
Either way, I've corrected the script to use the userid when banning.
If it doesn't work, let me know, perhaps I should use entity id instead.
You still type in the name of the player you're wanting banned. ULX will determine if they've faked the name as a number and attempt ban/kick approprately.
You don't have to use the userid, it can go by player name.

Yes, but I thought you might want the person who banned them in the reason field for SMban logs too.
As it stands, it will always look like console banned them if not.
I've removed the banned user name.
I do want the name of the person that banned them, the name of the banned player is what isn't needed.

At one time, the UK server was giving us a free 6 man server in exchange for links.
In all honesty, we don't want more, and should actually remove those, as the UK server dissapeared long ago.
I didn't mean for you to get another server, I thought you were just listing some good places to get gmod servers, so I was just giving you a good place in the US to have a link for.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sourcebans
« Reply #17 on: March 25, 2008, 07:29:21 PM »
You don't have to use the userid, it can go by player name.

How does SourceMod tell the difference between a person with a number for a name, and a player with that userid.
Say Tom and Fred are on a server.
Tom is a trouble maker. He runs status and sees Fred's userid is 12. Tom changes his name to 12
You quickly type sm_ban 12 0 Trouble maker
Does it kick Tom or Fred?

I understand more now yet one more reason you'd want to use ULX as an sm_ban addon. You feed ulx smban "name", it does the lookup for you.

Let me know how the beta2 file attached above works for you
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline compuwiz

  • Newbie
  • *
  • Posts: 29
  • Karma: 0
Re: sourcebans
« Reply #18 on: March 26, 2008, 12:42:46 PM »
Ok, I will edit this post when I have tried it, but I found more commands for it when looking at its source that I didn't realize were part of sourcebans.
Code: [Select]
RegAdminCmd("sm_ban", CommandBan, ADMFLAG_BAN, "sm_ban <#userid|name> <minutes|0> [reason]");
RegAdminCmd("sm_banip", CommandAddBan, ADMFLAG_BAN, "sm_banip <time> <ip|#userid|name> [reason]");
RegAdminCmd("sm_addban", CommandAddBan, ADMFLAG_RCON, "sm_addban <time> <steamid> <name> [reason]");
RegAdminCmd("sm_unban", CommandUnban, ADMFLAG_UNBAN, "sm_unban <steamid>");

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sourcebans
« Reply #19 on: March 28, 2008, 02:19:28 PM »
Those other commands could be added later. I'm just curious about how it's working with what we have now.

I use the 'Show Unread posts since last visit' link to monitor the boards so you might want to make a new post to say if it's working or not.

So far so good?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline compuwiz

  • Newbie
  • *
  • Posts: 29
  • Karma: 0
Re: sourcebans
« Reply #20 on: March 28, 2008, 02:30:22 PM »
I don't have anyone on my server right now to try it on. Join if you want and I can try it on you. Add me to steam friends: josephs

Offline compuwiz

  • Newbie
  • *
  • Posts: 29
  • Karma: 0
Re: sourcebans
« Reply #21 on: March 28, 2008, 04:14:18 PM »
A few people finally joined, it does not work. ULib bans them, but sourcemod does not; maybe you should just change it to player name.
« Last Edit: March 28, 2008, 04:16:00 PM by compuwiz »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sourcebans
« Reply #22 on: March 28, 2008, 06:32:37 PM »
Got your PM. I've been out. Looked over my code. Found glaring big error. Sorry.
Working on it now. Also working to clean up exploit potential.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sourcebans
« Reply #23 on: March 28, 2008, 07:55:55 PM »
Ok. Try this.
Make sure to come back with any _server_ console errors, if any, if it doesn't work.
Client side errors would help too, but not as much as server.
This is passing "sm_ban userid time "Admin_name Smbanned: reason" to the console. It should work now.
« Last Edit: March 28, 2008, 08:52:12 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline compuwiz

  • Newbie
  • *
  • Posts: 29
  • Karma: 0
Re: sourcebans
« Reply #24 on: April 02, 2008, 05:12:57 PM »
If I use GetName I get this error:
Code: [Select]
18:20:06 (ADMIN) (Console) SourceMod banned A{KOS}compuwiz for 1 minute(s) (test)
         ulx\modules/SourceModCmds.lua:33: Tried to use a NULL entity!
And if I try it on someone that isn't there, the server crashes.

If I use Nick I get this:
Code: [Select]
18:21:31 Invalid command entered. If you need help, please type "ulx help" in your console.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sourcebans
« Reply #25 on: April 23, 2008, 06:13:01 PM »
Garry's update from 2 days ago still didn't fix the name issue.
I'm still waiting. :/
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline compuwiz

  • Newbie
  • *
  • Posts: 29
  • Karma: 0
Re: sourcebans
« Reply #26 on: April 26, 2008, 11:49:17 AM »
Is there a chance that I could change one of the lua files on the server to correct the issue myself.

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given