Ban players if disconnect
So im searching for a plugin which bans people for disconnecting but they have 5 minutes to return.
If they return in 5 minutes no ban, if they return after 5 minutes ban! If mapchange was made within those five minutes, ban! Simple cvars. Ban_leavers 1 Ban_time 60 No_ban_return_time 5 It would also be cool if when a player disconnects a message is shown, player 1 left - he got 5 minutes to return of he will be banned for 60 minutes. |
Re: Ban if no return in 5 minutes.
Damn! Bugsy was helping you in your other thread, there's no reason to start a new one.
|
Re: Ban if no return in 5 minutes.
1 Attachment(s)
Not thoroughly tested. Use the attached CellTravTrie include as the original one has a warning when compiled due to the author not tagging a variable as a bool in TravTrieGetArrayEx().
Edit: Removed disconnect reason code. PHP Code:
|
Re: Ban if no return in 5 minutes.
Looks grate, want to test it but cant compile. Yes i downloaded celltravtrie.inc and placed it in include folder.
Quote:
|
Re: Ban if no return in 5 minutes.
You're not using the latest AMX-X dev build. Add this:
PHP Code:
|
Re: Ban if no return in 5 minutes.
Quote:
|
Re: Ban if no return in 5 minutes.
Quote:
|
Re: Ban if no return in 5 minutes.
Well i downloaded lastest beta AMXX the compile went good.
But i cant install latest beta on the server. Using 1.8.2 now. When i write in commands amx_plugins ban_leave.amxx it ses error bad load, is it cause the server doesnt have latest beta amxx? Will this help me to run the plugin on amxx 1.8.2? Quote:
|
Re: Ban if no return in 5 minutes.
I added the line to the above code, try it.
|
Re: Ban if no return in 5 minutes.
|
Re: Ban if no return in 5 minutes.
Are you trying to compile this with the dev build? If so you will need to comment or remove that line I added for max players.
|
Re: Ban if no return in 5 minutes.
Yes latest: http://www.amxmodx.org/snapshots.php
Removed the line and i could compile it. But still in server amx_plugins console prints ban_no_return.amxx bad load |
Re: Ban if no return in 5 minutes.
I don't know
Code:
[ 22] Speed Toggle 0.1 bugsy speedtoggle.amx running |
Re: Ban if no return in 5 minutes.
Wierd... Really needed this for amxx 1.8.2 cause cant install 1.8.3 on the server.
What amxx version are you using? I maybe should try to install 1.8.3 on local listen server and try. Will try this see if it helps. BTW, did i need disconnect_reason.amxx plugin for this to work? Cause i removed it. |
Re: Ban if no return in 5 minutes.
I'm running one of the later dev builds, the latest will be the same.
You do not need disconnect reason, this was only needed when the plugin would react differently based on how they disconnected. client_disconnect() fires when a map is changed so the plugin was needed to differentiate map change disconnects with a player actually clicking disconnect. |
Re: Ban if no return in 5 minutes.
Ok, i re-installed amxx 1.8.2 locally. I could compile it now without removing the line.
Uploaded the plugin to plugins folder and now its running. Need to test it now. |
Re: Ban if no return in 5 minutes.
Working good! Amxx 1.8.2
Ok i change the cvars before compile. "binr_enabled" , "1" "binr_reconnectmin" , "1" "binr_banmins" , "2" But when someone leaves it still says. PLAYER left - he has 5 minutes to return or he will be banned for 60 minutes. And btw, where are the bans saved? Cause i dont see any in banned.cfg Im also wondering, i run automix server, when the match is live, people can still join they cant join the server but for example if i would use your plugin disconnect reason it would show, disconnect: reason: match live, server full. So i think it is counted as disconnect and they will be banned for a false reason, trying to connect when server is full. This maybe i should fix by adding a password when server is full so people cant even try to connect. |
Re: Ban if no return in 5 minutes.
Quote:
|
Re: Ban if no return in 5 minutes.
Ok, why wouldnt i work?
Ok, then i shall put those cvars in server.cfg and restart. BTW, plugin maker, i have a problem: https://forums.alliedmods.net/showth...00#post2316900 Even if connected and auto-kicked its caunted as disconnect. Could you make something else or solve it or should i wait for help in other thread? I dont know, maybe that the client must be in a team first? But i think its better to wait for the password solution, i even think that if player allmost is connected and press cancel thats also counted as disconnect. |
Re: Ban if no return in 5 minutes.
Can this be made so users with FLAG A dont get banned
|
Re: Ban if no return in 5 minutes.
Yes, disconnect reason can detect if user was kicked and yes to FLAG A immunity.
|
Re: Ban if no return in 5 minutes.
Updated code to obey immunity and added disconnect reason check so it will only react when the client manually disconnected.
|
Re: Ban if no return in 5 minutes.
Good that i saved the last code u posted.
I really dont want to many plugins on the server and specielly those with alot of messages. So i solved my problem here: https://forums.alliedmods.net/showthread.php?t=265946 But still i would like flag a immunity in the last code u wrote. This one. Code:
#include <amxmodx> |
Re: Ban if no return in 5 minutes.
Im wondering how this plugin works.
So we say that plugin is enabled. When i disconnect the plugin counts we say 3 minutes. After 3 minutes it adds a ban on the disconnected steam id right? But if a map was changed for example and that map doesnt have the plugin enabled the plugin just couldnt count up ti 3 minutes so it didnt ban the player right? And if plugin was enabled and banned one player. Mapchange, plugin disabled the player can join again because the plugin is checking all leavers? And where are the bans stored cause it isnt in banned.cfg So i ran some tests. I enabled plugin, disconnected, tried to join again in 4 minutes. Yes i couldnt join cause of the ban. Change removed the plugin, changed the map thru rcon, tried to join. Yes i couldnt join so everything seems to work. But still, if i leave the server like 2 minutes before the plugin is disabled (reconnect time is 3 minutes) and tried to join it again i could, cause the plugin didnt count to 3 minutes and banned me yet? Right? In your code is it importet to change these lines and what those those lines mean? Quote:
|
Re: Ban if no return in 5 minutes.
When the plugin is disabled, it will not do anything. I thought this was common knowledge. Or am I misinterpreting your questions.
Quote:
Quote:
( iTimeLeft < 30 ) This is if the user did not reconnect within the set time. ( iSysTime - pdData[ DisconnectTime ] ) > ( iReconnectMinutes * 60 ) ) |
Re: Ban if no return in 5 minutes.
To get it right i need to change like this. I want a ban of 20 hours thats 1200 minutes.
So what values do i need to change if i want no return in 3 minutes and ban 1200 minutes? |
Re: Ban if no return in 5 minutes.
binr_reconnectmin 3
binr_banmins 1200 And I'm not sure why bans are not showing in the cfg, I noticed this as well during testing. Maybe search the net for this issue. |
Re: Ban if no return in 5 minutes.
Quote:
|
Re: Ban if no return in 5 minutes.
Tempbans are only stored in memory iirc, so they will never be shown anywhere if not stored by amxbans or similar plugins.
|
Re: Ban if no return in 5 minutes.
Is banid command considered a tempban? Or are you referring to the duration (time value specified vs permanent)?
|
Re: Ban if no return in 5 minutes.
banid != 0 = tempban
So ban, banid, banip != 0 is temporary and not stored anywhere but in memory. |
Re: Ban if no return in 5 minutes.
So if you ban someone for 36 hours, server shuts down after 12 and restarted, the ban is lost?
|
Re: Ban if no return in 5 minutes.
Iirc yes, that'S why i was running amxbans even if i had one server only
|
Re: Ban if no return in 5 minutes.
Quote:
|
Re: Ban if no return in 5 minutes.
Aha good to know! Good to know thanks for the help and info.
Yes if i rcon quit the bans are lost. But thats not a problem. BTW are u thinking of making A flag immunity without that disconnect reason plugin? |
Re: Ban if no return in 5 minutes.
Quote:
|
Re: Ban if no return in 5 minutes.
Well i have 12 slots server.
The auto mix + customvotes makes the server 2on2, 3on3, 4on4, 5on5. So if someone voted 2on2 max players who can join the server is 4 but still there are 12 slots so people can try to join but are kicked before even joining. So i solved this problem by setting up ¨sv_visiblemaxplayers 4¨ https://forums.alliedmods.net/showthread.php?t=265946 So thats not a problem anymore. Anyways i found another problem, yes people get banned when not re-joining in the specific time but, there arnt banned for exact time i set in binr_banmins 1200 So should i change all ¨iReconnectMinutes * 60¨ to 1200 ? |
Re: Ban if no return in 5 minutes.
Quote:
Ok, I will take out the disconnect reason code. Quote:
PHP Code:
PHP Code:
Code:
] banid |
Re: Ban if no return in 5 minutes.
Ok, so i tried this plugin it seemed to be working. But not.
I and others still get a ban if we do not return in 3 minutes. But we dont get banned for 1200 minutes. Im testing now for how long i have a ban when it should be 1200 minutes thats 20 hours. Do u have any suggestions? Maybe try to change last line banid to amx_ban or amx_addban? More info about this here btw the plugin in this link doesnt work: https://forums.alliedmods.net/archiv.../t-105731.html |
Re: Ban if no return in 5 minutes.
If you want to change to another ban system that's fine, just modify the server cmd line that sends the ban command.
|
All times are GMT -4. The time now is 00:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.