Phasor  01.00.10.059
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AFKDetection.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Player.h"
4 #include "../../Common/Timers.h"
5 #include "../../Common/vect3d.h"
6 #include "Server/Server.h"
7 
8 namespace halo { namespace afk_detection
9 {
11  {
12  private:
13  vect3d camera;
14  DWORD move_count, afk_duration, timer_id;
15  Timers& timers;
16  s_player& player;
17 
18  public:
19  CAFKDetection(s_player& player, Timers& timers);
21  void CheckPlayerActivity();
22  void MarkPlayerActive();
23 
24  // Called when the timer expires (check if they're afk)
25  void CheckInactivity();
26 
27  static DWORD max_duration; // max number of minutes inactive
28  static const DWORD kMoveCountThreshold;
29  static bool bDisable;
30  };
31 
32  void Enable();
33  void Disable();
35  commands::CArgParser& args, COutStream& out);
36 }}