On one of my servers, a player was kick voted. After the ban expired (during the same game), s/he came back and was again kick voted. The vote passed and the player was not banned.
]/!namelog mik
3 (*XXXXXXXX) ipaddr 'playername'
!namelog: 1 recent clients found
]/!ban ipaddr 2m the vote passed...
!ban: no player found by that name, IP, or slot number
(In reply to comment #1)
> I edited out the name in one place but not the other :x
>
the expired ban stays in memory until the end of the map, when it gets written discarded, the code to check if a player is banned probably stops when it finds a matching ban and does nothing because the ban expired.
it looks like this is the offending line in g_admin_ban, it will skip over players who are already banned, even if that ban has expired.
if( g_admin_namelog[ i ]->banned )
continue;
Created attachment 1348[details]
partial r910 revision
> reverting all the banned stuff from revision 910 fixes the problem
>
And by that, I mean just the .banned stuff (not a total reversion).
Created attachment 1356[details]
svn939 ban vs namelog
The reason "banned" is tracked in the namelog was to combat a different problem: players could reconnect with the name of a player who was previously banned and then become immune to ban (because it didn't skip over the old name when searching the namelog).
This patch simply clears the "banned" bit if a player reconnects claiming an already existing namelog spot.
Seem OK?
(In reply to comment #6)
> Created an attachment (id=1356) [details]
> svn939 ban vs namelog
>
> The reason "banned" is tracked in the namelog was to combat a different
> problem: players could reconnect with the name of a player who was previously
> banned and then become immune to ban (because it didn't skip over the old name
> when searching the namelog).
>
This will only make them immune to bans by name.
> This patch simply clears the "banned" bit if a player reconnects claiming an
> already existing namelog spot.
>
> Seem OK?
>
That would solve the issue of repeatedly banning someone who repeatedly reconnects... but that seems to miss the point. You should be able to ban them even when they are not there.
The issue of whether someone else connects with the same name is a non-issue because you already cannot ban someone by name if someone who is currently connected has the same name.
Created attachment 1417[details]
!adjustban admin command
Attachment 1356[details] is probably right, since re-banning a player who is still banned probably should not be used. But sometimes bans are made improperly (wrong expiration, no reason) and need to be adjusted later. Maybe a new command (like the untested one in this patch) should be added for that?
Created attachment 1356 [details] svn939 ban vs namelog The reason "banned" is tracked in the namelog was to combat a different problem: players could reconnect with the name of a player who was previously banned and then become immune to ban (because it didn't skip over the old name when searching the namelog). This patch simply clears the "banned" bit if a player reconnects claiming an already existing namelog spot. Seem OK?
Created attachment 1419 [details] !adjustban that actually works