Coder Social home page Coder Social logo

ULX Ban Message about ulx HOT 16 CLOSED

teamulysses avatar teamulysses commented on June 20, 2024
ULX Ban Message

from ulx.

Comments (16)

Nayruden avatar Nayruden commented on June 20, 2024

How would you suggest fixing being ugly?

On Tue, Dec 15, 2015 at 8:42 AM, David Dorn [email protected]
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.

from ulx.

deinemudda32 avatar deinemudda32 commented on June 20, 2024

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

Compared with more informations it should look way better.

from ulx.

Nayruden avatar Nayruden commented on June 20, 2024

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 [email protected]
wrote:

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


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

from ulx.

deinemudda32 avatar deinemudda32 commented on June 20, 2024

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

from ulx.

Nayruden avatar Nayruden commented on June 20, 2024

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 [email protected]
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).

from ulx.

Nayruden avatar Nayruden commented on June 20, 2024

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 [email protected]
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 [email protected]
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).

from ulx.

deinemudda32 avatar deinemudda32 commented on June 20, 2024

I should've known that. sorry

from ulx.

Nayruden avatar Nayruden commented on June 20, 2024

Any other suggestions for improving look and feel?

On Tue, Dec 15, 2015 at 9:05 AM, David Dorn [email protected]
wrote:

I should've known that.


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

from ulx.

deinemudda32 avatar deinemudda32 commented on June 20, 2024

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

from ulx.

deinemudda32 avatar deinemudda32 commented on June 20, 2024

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.

from ulx.

Nayruden avatar Nayruden commented on June 20, 2024

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

On Tue, Dec 15, 2015 at 9:23 AM, David Dorn [email protected]
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).

from ulx.

deinemudda32 avatar deinemudda32 commented on June 20, 2024

I didnt mean that.

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

from ulx.

comedinha avatar comedinha commented on June 20, 2024

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

from ulx.

Nayruden avatar Nayruden commented on June 20, 2024

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 [email protected]
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).

from ulx.

comedinha avatar comedinha commented on June 20, 2024

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 )

from ulx.

comedinha avatar comedinha commented on June 20, 2024

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

from ulx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.