1. These forums are still being retired! Please use GitHub discussions or Discord. You cannot create new threads or new accounts now. If you need to contact some user of the forums, you should do it sooner, rather than later. This notice was last updated on May 30th, 2021.

[1.14] KickAFK

Discussion in 'Unsupported / Outdated Plugins' started by Colin, Oct 12, 2013.

  1. Colin

    Colin Level 5

    Joined:
    Nov 25, 2011
    Messages:
    100
    Description:
    This a simple, lightweight plugin that kicks players if they do not move for a specified amount of time.

    Config:
    The config file is in JSON format.
    Code:
    {
      "KickTime": 600,
      "WarnTime": 540,
      "KickMsg": "Was inactive for too long"
    }
    KickTime - Time in seconds after which a player will be kicked.
    WarnTime - Time in seconds after which the server will start warning the player every five seconds that they are going to be kicked soon.
    KickMsg - Reason given to player when kicked.

    Links:
    Download
    Source Code

    Change Log:

    1.2 - Idle time reset by chat
    1.1 - Added config file
    1.0 - Initial release
     
  2. Wolfe

    Wolfe Level 9

    Joined:
    Jan 3, 2012
    Messages:
    386
    How does the plugin detect when you're not afk? For example, does using an item, chatting, or using a command count as being active? Or is it completely based off movement?
     
  3. Wight

    Wight Administrator
    TShock Admin TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    May 20, 2012
    Messages:
    1,598
    Entirely based on movement
     
  4. RedAlpha1234

    RedAlpha1234 Level 1

    Joined:
    Oct 28, 2013
    Messages:
    6
    colin can you update the link it is not working
     
  5. Azaxel

    Azaxel Level 3

    Joined:
    Apr 9, 2013
    Messages:
    49
    so if i'm not mistaken tshock.admin.nokick makes it so u can't get kicked for afk?
     
  6. Ancientgods

    Plugin Developer Zero Day Plugin Author

    Joined:
    Sep 15, 2013
    Messages:
    712
    Nope, you're incorrect, only the command /kick checks for players with the tshock.admin.nokick permission, not just any plugin that kicks players.

    Edit: sorry my bad, in this case you are indeed right:
    Code:
                                if (p.IdleTime > Config.KickTime && !p.TSPlayer.Group.HasPermission("tshock.admin.nokick"))
                                {
                                    TShock.Utils.Kick(p.TSPlayer, Config.KickMsg, false, false, "Server", true);
                                }
    just checked the source code :p
     
  7. Colin

    Colin Level 5

    Joined:
    Nov 25, 2011
    Messages:
    100
    Link updated.