Jump to content

[feature] Kick on AFK


Recommended Posts

Posted

In Player.cpp, bool Player::ToggleAFK() (line 1577) change the function to:

bool Player::ToggleAFK()
{
   ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK);

   bool state = HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_AFK);

   // afk player not allowed in battleground
   if(state && InBattleGround())
       LeaveBattleground();
   if(state)
       GetSession()->KickPlayer();

   return state;
}

Posted

no, logout AFK more long that plain AFK mark set. As i know this is client side feature, client send logout request after some delay. Maybe client use some specific flag in packet for like glogout request and then you can use it for kick instead logout call.

Posted

I want the character to be logged out from his account, all the way to the login screen. :)

I don't know if a message like this "You've been logged out from your account due to ..." exits, so i'll use kick from account instead. Offcourse a more proper message would be welcomed.

Patman128, your ideea is to auto kick on afk, that's not a very good solution.

Posted
Let's do it in another way. Let's kick users that only stay on the login screen more then 5 minutes. :)

I know mangos keeps tracks of them and should not be hard to implement.

That should be - in fact- blizzlike:

# You'll be logged off and sent to the character selection screen if you are AFK for 30 minutes.

# You'll be disconnected from the server if you remain at the character selection screen for 30 minutes.

(a config option would be nice)

Posted

While you're at it, don't forget to include an exception for GMs. I actually wish that AFK could be disabled completely for GMs. There are times when I'm not actually playing for extended periods because of work I'm doing with the server console or database but, I need to remain logged in to keep an eye on things.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use