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

Request: Bantime on ClientLeaveEvent #312

Open
marcschuler opened this issue Feb 10, 2019 · 1 comment
Open

Request: Bantime on ClientLeaveEvent #312

marcschuler opened this issue Feb 10, 2019 · 1 comment

Comments

@marcschuler
Copy link

When a client is banned (-> the reasonid is set to 6), the field bantime is present in the ClientLeaveEvent map and indicates for how long (in seconds) a client is banned.

One should add a method like "getBanTime()" to this class, returning the ban time as an integer (or can it be a long?) in seconds.
/** * * @return the ban time in seconds, 0 if indefinite or -1 if a client is banned (reasonId=6) */ public int getBanTime(){ return getInt("bantime"); }

Examples (ClientLeaveEvent.toString):

2 Seconds: {cfid=1, bantime=2, ctid=0, invokername=KarlTheBee, reasonmsg=test, reasonid=6, invokeruid=756VTuJBEftbJhTEJAIB4Q4cDR4=, invokerid=14, clid=4}
indefinite: {cfid=1, bantime=0, ctid=0, invokername=KarlTheBee, reasonmsg=test, reasonid=6, invokeruid=756VTuJBEftbJhTEJAIB4Q4cDR4=, invokerid=14, clid=6}

@rogermb
Copy link
Collaborator

rogermb commented Feb 11, 2019

I agree, this should be part of the API. I'll try to implement it for v1.3.0 😄

Thanks for the detailed enhancement proposal!

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

2 participants