AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [L4D(2)] AFK Manager (https://forums.alliedmods.net/showthread.php?t=115020)

Matthias Vance 01-09-2010 14:31

[L4D(2)] AFK Manager
 
2 Attachment(s)
Plugin features
  • Put AFK people in spectator team.
  • Provide sm_idle (you can use this in chat as /idle or !idle) so players can manually switch to the spectator team.
  • Spectators will be kicked after a specified amount of time.
  • Administrators with a certain flag ("z"/Admin_Root by default) will not get kicked from spectator.
  • A configuration file will be autocreated. (/left4dead2/config/sourcemod/l4d_afkmanager.cfg)
Instructions
  • Place the l4d_afkmanager.txt file in your gamedata directory.

CVARs

NB: All times are in seconds.
  • l4d_afkmanager_version
    • Version information
  • afk_immuneflag
    • Admins with this flag will not be kicked (default: "z")
  • afk_adinterval
    • Interval in which the plugin will advertise the 'idle' command. (default: "120", set to "0" to disable)
  • afk_spectime
    • Maximum time someone can be idle before (s)he is moved to the Spectator team. (default: "20")
  • afk_kicktime
    • Maximum time someone can be spectating before (s)he is kicked. (default: "40")
  • afk_messages
    • Message level. (default : "3", 0 = disable, 1 = spec, 2 = kick, 3 = spec + kick)
Commands

  • sm_idle
    • Switch to spectator team.
  • sm_team
    • Join a team.
Changelog

  • 2010-01-27
    • Fix for crashes on menu.
  • 2010-01-25 (v1.2)
    • [FIX] Fixed crashes.
  • 2010-01-11
    • [FIX] Correctly ignores bots now.
    • [ADD] Warning messages when players are moved to Spectator, or are kicked.
    • [ADD] CVAR : afk_messages
  • 2010-01-10 (v1.1)
    • [DEL] CVAR : afk_time
    • [ADD] CVAR : afk_spectime
    • [ADD] CVAR : afk_kicktime
    • [ADD] Warning message for players that are in the Spectator team.
    • [ADD] Added sm_team command.
  • 2010-01-10
    • [FIX] Fixed a bug where timers would not be stored.
  • 2010-01-09 (v1.0)
    • Initial release.
Have fun!

Kind regards,

Matthias Vance

Blu3star 01-09-2010 17:55

Re: [L4D(2)] AFK Manager
 
works as intended. I was needin' this bad.

Matthias Vance 01-10-2010 07:55

Re: [L4D(2)] AFK Manager
 
Uploaded a new version that fixes not storing timer handles.

For A Fistful Of Brain 01-10-2010 09:13

Re: [L4D(2)] AFK Manager
 
When Im in Spec-Mode how do I come back? I have set the Plugin so that you won't be kicked when in Specmode but unless you have set a higher value for vs_max_team_switches, you won't be coming back, right?

Matthias Vance 01-10-2010 09:38

Re: [L4D(2)] AFK Manager
 
That is correct (if you already changed a team before). I am currently adding a !team command that let's you change teams regardless of that CVAR.

Visual77 01-10-2010 15:36

Re: [L4D(2)] AFK Manager
 
Could it be possible to add a chat message when someone is kicked/moved to spectate? So people know who's afk and who was kicked.

ZOOZ 01-10-2010 19:42

Re: [L4D(2)] AFK Manager
 
Its kicking bots!... It is not good)
I am using 8 vs 8 server...

Matthias Vance 01-11-2010 03:22

Re: [L4D(2)] AFK Manager
 
Quote:

Originally Posted by Visual77 (Post 1050702)
Could it be possible to add a chat message when someone is kicked/moved to spectate? So people know who's afk and who was kicked.

Yup, I'll add that today!

Quote:

Originally Posted by ZOOZ (Post 1050933)
Its kicking bots!... It is not good)
I am using 8 vs 8 server...

Oops! I don't check for bots, my mistake! I'll also fix that today.
On a sidenote: Bots shouldn't be AFK at all!

[Edit]
I uploaded a new version that fixes those two issues.

Visual77 01-11-2010 08:39

Re: [L4D(2)] AFK Manager
 
Thanks. Now I'm only missing a count down message displayed too the player if he is standing still for x seconds. Like: You will be forced to spectate in x seconds" Could you add this too?

SaintK 01-11-2010 08:40

Re: [L4D(2)] AFK Manager
 
Quote:

Originally Posted by Visual77 (Post 1051406)
Thanks. Now I'm only missing a count down message displayed too the player if he is standing still for x seconds. Like: You will be forced to spectate in x seconds" Could you add this too?

This won't be included in the current version. Perhaps after the plugin has been finished and delivered as ordered.

Visual77 01-11-2010 08:44

Re: [L4D(2)] AFK Manager
 
I thought Matthias made those calls :wink:
The countdown message is needed, becuase if you are a hunter/smoker and you pounce/drag a survivor for 20 seconds, without touching mouse or keyboard, you get switched to spectate without knowing it. Same if you charge someone most likely.

Matthias Vance 01-11-2010 09:04

Re: [L4D(2)] AFK Manager
 
Yes, I make those calls. :wink:

It doesn't only check your position, but also where you're aiming.

I didn't add that in this version because the default times are rather short.

SaintK 01-11-2010 09:11

Re: [L4D(2)] AFK Manager
 
-edit- argh, browser stuck. Forget this reply.

Visual77 01-12-2010 10:14

Re: [L4D(2)] AFK Manager
 
Well, despite of what the plugin does, it still kicks smoker/hunter/charger if they don't move their aim while they drag, pounce or charge.

You don't need to add it, but I think it's better if you let people know if they need to move, before they get switched. This is just a request :wink:

InFaility Ward 01-12-2010 11:56

Re: [L4D(2)] AFK Manager
 
does this also work by kicking the person immediately without switching him/her to spec?

Matthias Vance 01-12-2010 11:59

Re: [L4D(2)] AFK Manager
 
Quote:

Originally Posted by InFaility Ward (Post 1052732)
does this also work by kicking the person immediately without switching him/her to spec?

That's currently not possible, but I will add a CVAR to incorporate this feature later.

InFaility Ward 01-12-2010 12:21

Re: [L4D(2)] AFK Manager
 
What about if I just put the time to be allowed in spec 1 sec?

Matthias Vance 01-12-2010 12:41

Re: [L4D(2)] AFK Manager
 
Quote:

Originally Posted by InFaility Ward (Post 1052759)
What about if I just put the time to be allowed in spec 1 sec?

Haha you're very creative. The check time is set to 2 seconds, so they'll be in spectator for a maximum of 2 seconds. (that is, if you set it to <= 2)

Visual77 01-15-2010 09:09

Re: [L4D(2)] AFK Manager
 
How about adding an option for admin immunity against being switched to spectate?

Matthias Vance 01-16-2010 09:13

Re: [L4D(2)] AFK Manager
 
I'll add that, and a few more features, but after that I'm dropping support for my L4D(2) plugins.

dirka_dirka 01-18-2010 13:49

Re: [L4D(2)] AFK Manager
 
this plugin is incompatible with the pause plugin... it kicks everyone if pause isnt turned off in time.

i dunno if theres anything you can do to help with that, but if so, it would be great.. like maybe disable kicking if pause is detected.

would be nice if you could also change/disable the kicking during pre/end round game times (ie: before leaving safe room and after closing checkpoint door).

finally.. why is this plugin in the unapproved section. it mentions cvar change as a reason, but is that because the author wont change a cvar or because it changes a cvar it shouldnt?

i like this plugin mostly because it partially fixes the spectator bug that so many people suffer.

Matthias Vance 01-18-2010 13:59

Re: [L4D(2)] AFK Manager
 
Quote:

Originally Posted by dirka_dirka (Post 1059216)
this plugin is incompatible with the pause plugin... it kicks everyone if pause isnt turned off in time.

Ouch. Since I'm dropping support for L4D2, that's not going to get added. Have a crab instead : :crab:.

Quote:

Originally Posted by dirka_dirka (Post 1059216)
would be nice if you could also change/disable the kicking during pre/end round game times (ie: before leaving safe room and after closing checkpoint door).

Definitely a good idea.

Quote:

Originally Posted by dirka_dirka (Post 1059216)
finally.. why is this plugin in the unapproved section. it mentions cvar change as a reason, but is that because the author wont change a cvar or because it changes a cvar it shouldnt?

Each plugin has its own public CVAR, which you get one shot at choosing. Mine was too long, which I didn't see, so I asked for an unapproval. The problem however is that the re-approvement process is borked.

Visual77 01-18-2010 14:00

Re: [L4D(2)] AFK Manager
 
What are you talking about? I'm just trying to be creative and help him develop the plugin with new ideas.

Regarding the other issue, this should not go through all people on this forum. If you want to talk about something personal, you take contact by a PM or memo.

Visual77 01-18-2010 14:03

Re: [L4D(2)] AFK Manager
 
I haven't recived any private messages, so obvisoly you did not.

SaintK 01-18-2010 14:07

Re: [L4D(2)] AFK Manager
 
Quote:

Originally Posted by Visual77 (Post 1059238)
I haven't recived any private messages, so obvisoly you did not.

resend it.

dirka_dirka 01-19-2010 12:50

Re: [L4D(2)] AFK Manager
 
has anyone actually used the !team command instead of pressing m? had someone use it last night for the first time and the server crashed instantly. i cant find anything in the logs except that w/i 1 second of !team, no more server.

dirka_dirka 01-19-2010 20:12

Re: [L4D(2)] AFK Manager
 
was able to reproduce the crash...
if someone tries to join a team with !team as they are getting kicked - dead server.

dirka_dirka 01-19-2010 20:26

Re: [L4D(2)] AFK Manager
 
1 Attachment(s)
I edited the plugin to disable the team menu that is created and adjusted the message to tell players to use their Select Team button instead

Matthias Vance 01-25-2010 15:45

Re: [L4D(2)] AFK Manager
 
I fixed all issues, and I'm uploading it right now.

ShootTheCharger 02-07-2010 23:38

Re: [L4D(2)] AFK Manager
 
Does not work with L4D2.


L 02/08/2010 - 04:37:00: [SM] Displaying call stack trace for plugin "l4d_afkmanager.smx":
L 02/08/2010 - 04:37:00: [SM] [0] Line 61, /home/groups/alliedmodders/forums/files/4/5/9/7/0/58434.attach::OnPluginStart()
L 02/08/2010 - 04:37:02: [SM] Plugin encountered error 25: Call was aborted
L 02/08/2010 - 04:37:02: [SM] Native "SetFailState" reported: [AFK Manager] SetHumanSpec not found.
L 02/08/2010 - 04:37:02: [SM] Displaying call stack trace for plugin "l4d_afkmanager.smx":
L 02/08/2010 - 04:37:02: [SM] [0] Line 70, /home/groups/alliedmodders/forums/files/4/5/9/7/0/58434.attach::OnPluginStart()

dirka_dirka 02-08-2010 02:44

Re: [L4D(2)] AFK Manager
 
shootthecharger, try the one i posted 2 above your response. i havent updated to his last build, and i know for a fact the one i posted works (i use it all the time). if that one doesnt work, its your server.

Matthias Vance 02-08-2010 02:59

Re: [L4D(2)] AFK Manager
 
Quote:

Originally Posted by dirka_dirka (Post 1082429)
shootthecharger, try the one i posted 2 above your response. i havent updated to his last build, and i know for a fact the one i posted works (i use it all the time). if that one doesnt work, its your server.

As you can see I uploaded a fully working version a while ago, there is no need to provide custom builds, so please remove your version. :nono:

Matthias Vance 02-08-2010 03:00

Re: [L4D(2)] AFK Manager
 
Quote:

Originally Posted by ShootTheCharger (Post 1082340)
Does not work with L4D2.

Do not generalize. That it doesn't work for you does not mean it doesn't work L4D2.

So, if you still have problems, give me some debug information. Is this since the last update, and, did you copy the gamedata over?

dirka_dirka 02-08-2010 13:48

Re: [L4D(2)] AFK Manager
 
Quote:

Originally Posted by Matthias Vance (Post 1082436)
As you can see I uploaded a fully working version a while ago, there is no need to provide custom builds, so please remove your version. :nono:

i havent tried your latest build.. and i posted that AFTER you claimed you were stopping support. it was already there, so i told the guy to try it and see if its the newest build. its still your code.. minus the !team

the reason i havent tried your latest build is because i got this plugin working with the game paused.

ShootTheCharger 02-08-2010 17:55

Re: [L4D(2)] AFK Manager
 
OK, It doesn't work on my server.
I posted the info from the log file.

What is the problem ?

Matthias Vance 02-09-2010 02:08

Re: [L4D(2)] AFK Manager
 
I already asked you a question, and I suggest you read up.

rek075 02-10-2010 12:10

Re: [L4D(2)] AFK Manager
 
Matthias:

I was curious how you implemented your immunity to kick. Looking through the code I noticed that the cvar "afk_immuneflag" (immuneFlagChar) isn't used by anything. Am I missing something here? I don't completely understand the admin API, so I wasn't sure whether it was being handled or not.

rek075 02-10-2010 23:46

Re: [L4D(2)] AFK Manager
 
Is there a gamedata file missing? I get the error:

L 02/10/2010 - 22:42:10: [SM] Error parsing gameconfig file "/usr/local/games/left4dead2/816973/68.232.174.107:27015/left4dead2/left4dead2/addons/sourcemod/gamedata/l4d_afkmanager.txt":
L 02/10/2010 - 22:42:10: [SM] Error 1 on line 0, col 0: Stream failed to open
L 02/10/2010 - 22:42:10: [SM] Native "LoadGameConfigFile" reported: Unable to open l4d_afkmanager: File could not be opened: No such file or directory
L 02/10/2010 - 22:42:10: [SM] Displaying call stack trace for plugin "custom/l4d_afkmanager.smx":
L 02/10/2010 - 22:42:10: [SM] [0] Line 61, l4d_afkmanager.sp::OnPluginStart()

Matthias Vance 02-12-2010 04:45

Re: [L4D(2)] AFK Manager
 
Seems that I forgot to upload a gamedata file. Oops! It's there now.

Matthias Vance 02-12-2010 04:53

Re: [L4D(2)] AFK Manager
 
Quote:

Originally Posted by rek075 (Post 1084612)
I was curious how you implemented your immunity to kick. Looking through the code I noticed that the cvar "afk_immuneflag" (immuneFlagChar) isn't used by anything.

Well, I only use the variable immuneFlagChar as a default variable, I should change that to be an inline "z".

Also, it's all about the immuneFlag variable. That gets set when the user changes the afk_immuneflag CVAR.


All times are GMT -4. The time now is 18:02.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.