Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ULX Ban Message #12

Closed
deinemudda32 opened this issue Dec 15, 2015 · 16 comments
Closed

ULX Ban Message #12

deinemudda32 opened this issue Dec 15, 2015 · 16 comments
Assignees

Comments

@deinemudda32
Copy link

Looks really ugly at the current state and it could provide more information.

Should be added:
You are banned from this server!

  • Reason: reason or unknown
  • Admin: name or console
  • You were banned on: os.date
  • You will be unbanned in: Never or os.date
@Nayruden
Copy link
Member

How would you suggest fixing being ugly?

On Tue, Dec 15, 2015 at 8:42 AM, David Dorn notifications@github.com
wrote:

Looks really ugly at the current state and it could provide more
information

Should be added:
You are banned from this server!

  • Reason: reason or unknown
  • Admin: name or console
  • You were banned on: osdate
  • You will be unbanned in: Never or osdate


Reply to this email directly or view it on GitHub
#12.

@deinemudda32
Copy link
Author

Remove the "disconnect:" from the message would help a lot.

Compared with more informations it should look way better.

@Nayruden
Copy link
Member

Unfortunately, we can't do that without using a source module (like
GateKeeper, if that's even still around). Any other suggestions for
improving the look and feel?

Information displayed is something we knew people would want to change when
we created this. We are happy with what we currently show for the default.
Not everyone will want to display additional information. We may make it
configurable in the future.

On Tue, Dec 15, 2015 at 8:54 AM, David Dorn notifications@github.com
wrote:

Remove the "disconnect:" from the message would help a lot.


Reply to this email directly or view it on GitHub
#12 (comment).

@deinemudda32
Copy link
Author

https://scriptfodder.com/scripts/view/248
This addon removed it.
Maybe ask the author of it, how they did do it.

@Nayruden
Copy link
Member

That's the connection message -- ULX doesn't show "disconnected" in that
state either. It's only when they are already connected and you are kicking
them that "Disconnected" has to be shown in the way Garry has it setup
currently.

On Tue, Dec 15, 2015 at 9:01 AM, David Dorn notifications@github.com
wrote:

https://scriptfodder.com/scripts/view/248
This addon removed it.
Maybe ask the author of it, how they did do it.


Reply to this email directly or view it on GitHub
#12 (comment).

@Nayruden
Copy link
Member

Alternatively, I suppose ULX could work around the engine limitation by
forcing the user to reconnect in order to show the message without the
"disconnect", but that is way too hackish for my tastes.

On Tue, Dec 15, 2015 at 9:03 AM, Brett Smith smith.brett.41@gmail.com
wrote:

That's the connection message -- ULX doesn't show "disconnected" in that
state either. It's only when they are already connected and you are kicking
them that "Disconnected" has to be shown in the way Garry has it setup
currently.

On Tue, Dec 15, 2015 at 9:01 AM, David Dorn notifications@github.com
wrote:

https://scriptfodder.com/scripts/view/248
This addon removed it.
Maybe ask the author of it, how they did do it.


Reply to this email directly or view it on GitHub
#12 (comment).

@deinemudda32
Copy link
Author

I should've known that. sorry

@Nayruden
Copy link
Member

Any other suggestions for improving look and feel?

On Tue, Dec 15, 2015 at 9:05 AM, David Dorn notifications@github.com
wrote:

I should've known that.


Reply to this email directly or view it on GitHub
#12 (comment).

@deinemudda32
Copy link
Author

Maybe leave a few empy lines. So there is more structure.

@deinemudda32
Copy link
Author

I dont know honestly.
For the informations about which admin did ban you and when did you get banned etc., you could add a convar like "ulx_showdetailedbans". Just in case.

Maybe you can change the message if you are banned from the server while being on it, to the old message.

@Nayruden
Copy link
Member

You like the old message format more than the new one?

On Tue, Dec 15, 2015 at 9:23 AM, David Dorn notifications@github.com
wrote:

I dont know honestly.
For the informations about which admin did ban you and when did you get
banned etc., you could add a convar like "ulx_showdetailedbans". Just in
case.

Maybe you can change the message if you are banned from the server while
being on it, to the old message.


Reply to this email directly or view it on GitHub
#12 (comment).

@deinemudda32
Copy link
Author

I didnt mean that.

I meant if you get the "disconnect" thing, maybe display the old style, because of that.

@comedinha
Copy link

The hook "CheckPassword" with check "if player is ban" and "return false, msg to sent"

@Nayruden
Copy link
Member

Bruno, what are you talking about? ULX is using that hook -- do you know of
a better way?

On Tue, Dec 15, 2015 at 12:46 PM, Bruno Carvalho notifications@github.com
wrote:

The hook "CheckPassword" with check "if player is ban" and "return false,
msg to sent"


Reply to this email directly or view it on GitHub
#12 (comment).

@comedinha
Copy link

Change the reason to most details

Not tested:

local banJoinMsg = [[
===========YOU ARE BANNED===========
By: %s
Reason: %s
Ban since: %s
Time Left: %s]]
local function checkBan( steamid64, ip, password, clpassword, name )
    local steamid = util.SteamIDFrom64( steamid64 )
    local banData = ULib.bans[ steamid ]
    if not banData then return end -- Not banned

    local admin = "Console"
    if banData.admin and banData.admin ~= "" then
        admin = banData.admin
    end

    local reason = "(None given)"
    if banData.reason and banData.reason ~= "" then
        reason = banData.reason
    end

    local timeban = "Unknown"
    if banData.time > 0 then
        timeban = os.date("%m/%d/%y %H:%M", timeban.time)
    end

    local unbanStr = nil
    local unban = tonumber( banData.unban )
    if unban and unban > 0 then
        unbanStr = ULib.secondsToStringTime( unban - os.time() )
    end

    if reason or unbanStr then -- Only give this message if we have something useful to display
        Msg(string.format("%s (%s)<%s> was kicked by ULib because they are on the ban list\n", name, steamid, ip))
        return false, banJoinMsg:format( admin, reason, timeban, unbanStr or "(Permaban)" )
    end
end
hook.Add( "CheckPassword", "ULibBanCheck", checkBan, HOOK_LOW )

@comedinha
Copy link

And on addBan not now ========YOU HAVE BEEN BANNED========

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants