-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Feature Request: Allow people to AFK/Away in City without getting disconnected to character selection screen. [$10 awarded] #2139
Comments
Isn't this something that is done by the client? |
I talked with two devs here, they said its likely serverside. but i wont mind if its clientside. Bounty will go the dev that can achieve this |
I did some tests and found out that: And we can add code to: Maybe:
This will prevent players that have the afk tag to logout. Any ideas? |
Oh so it can be done server side! great work @lineagedr But is it possible to detect if player is in a City like Dalaran? I still want people to get disconnected if they AFK in battlegrounds or outside cities thou |
If players afk in a bg they'll be automatically kicked from the BGs. By default it's already in the Core. It is possible to detect if a player is in a city but I'm not sure why would you want that? Is there a special exception you want? Because the code above works anywhere in-game. |
@lineagedr i just want players to be allowed to afk without getting kicked in safe zones. If it's too hard then maybe allowing Dalaran to be safe to afk without getting kicked? or all major cities. |
@andoys So, only in safe zones. Got it. |
@andoys This will check if the player has a AFK tag and if they are in a safe zone they won't be kicked if HandleLogoutRequestOpcode is called
|
Wow great work! Which file did you add/edit this in src? |
Change the code to:
In MiscHandler.cpp Above the Making it configurable via worldserver.conf: Edit World.h Add:
Below:
Then edit World.cpp Add:
Below:
And lastly add it to your worldserver.conf: Misc.DenyKickingAFKers = 1 |
@lineagedr great work! were you able to test this on your server? |
It does work but like I've mentioned above it's not optimal
|
@lineagedr What happens if lets say if 20 clients does the logout request? is it every second? or? What would be the worst that could happen? Also is there a way to contact you? Are you in Azerothcore Discord? Hmm your right maybe we should wait for something more optimal |
@andoys It may cause server lag if there's a lot of players that have been afk long enough to trigger the clients inactivity kick. And although we prevent the logout we can't prevent the client sending the CMSG_LOGOUT_REQUEST. Atleast I'm not sure how to do it. It's best to wait for a better way. |
please check #2205 . From what i can see from logs, if i send back a reason for denying logout it won't spam it again immediatly after. |
@pklloveyou please give your test feedback in the PR page (not here). Thank you |
Feature Request: Allow people to AFK/Away in City without getting disconnected to character selection screen.
Can be Module
or
Core Edit (maybe configurable by worldserver.conf to enable/disable)
if this is clientside then no problem if someone can do it also
Currently there's no option for this.
This config is for people who are away/afk in character selection screen:
The $10 bounty on this issue has been claimed at Bountysource.
The text was updated successfully, but these errors were encountered: