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

Refactor AFK function + Support for Logged out + Fix Locale message #333

Closed
wants to merge 9 commits into from
Closed

Refactor AFK function + Support for Logged out + Fix Locale message #333

wants to merge 9 commits into from

Conversation

S33G
Copy link
Contributor

@S33G S33G commented Jan 16, 2023

  • Much less spagetti code
  • Reinstates locale message as it was missing
  • Includes AFK for logged out users (ie. qb-multicharacter)
  • Adds config option for enable/disable
  • Changed notification duration to avoid overlapping notifications

Fixes:
#281

Duplicates:
#331

@S33G S33G changed the title Refactor AFK function Refactor AFK function + Support for Logged out + Fix Locale message Jan 16, 2023
S33G and others added 2 commits January 16, 2023 04:59
- Reinstates locale message as it was missing
- Includes AFK for logged out users (ie. qb-multicharacter)
- Adds config option for enable/disable

Co-authored-by: Charlie <[email protected]>
Co-authored-by: Duo <[email protected]>
@DuoTheDev
Copy link

Hello. I went ahead and tested this to make sure it behaved how I intended. It seems to be good to me.

I still like the idea of adding a different configurable afk timer for the time before the player logs in. I just think that it should be shorter than a player who is logged in. Would be open to discussing this more and hearing your thoughts!

@S33G S33G requested a review from Z3rio January 25, 2023 17:15
Copy link
Contributor

@r0adra93 r0adra93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@S33G
Copy link
Contributor Author

S33G commented Jan 26, 2023

Hello. I went ahead and tested this to make sure it behaved how I intended. It seems to be good to me.

I still like the idea of adding a different configurable afk timer for the time before the player logs in. I just think that it should be shorter than a player who is logged in. Would be open to discussing this more and hearing your thoughts!

I feel this pr does enough right now and is still an improvement on what we have currently.
Maybe we can introduce another config variable once this one is merged :)

Copy link

@Irishstevie Irishstevie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree just run this on a clean install and works great

if checkUser then
function getTimeUnit(time)
return time >= 60 and 'minutes' or 'seconds'
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a linebreak here below end

@S33G S33G closed this by deleting the head repository Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants