Page 1 of 1

[FIXED] Banned player remains online

Posted: February 23rd, 2012, 12:59 am
by KingCrab
Image

Apparently after a /banall, this guy remained on the server even though he was banned. He had the red asterisk as well. Not sure if its a bug or just a random glitch.

Re: Banned player remains online

Posted: February 23rd, 2012, 1:59 am
by fragmer
I'll check the logs.

EDIT:

Code: Select all

00:54:21 > Player Hicks31 connected from 66.10.94.35.
00:54:21 > Player Hicks31 joined world main.
00:54:21 > Player.JoinWorldNow: Sending compressed map (261277 bytes) to Hicks31.
00:54:23 > KingCrab72: /banall guthix1234 Griefing IP
00:54:23 > IPBanList.Save: Saving IP ban list (4196 records).
00:54:23 > KingCrab72 banned 66.10.94.35 (BanAll guthix1234). Reason: Griefing IP
00:54:23 > KingCrab72 banned bigkeat31 (BanAll guthix1234). Reason: Griefing IP
00:54:23 > KingCrab72 banned guthix1234 (BanAll guthix1234). Reason: Griefing IP
00:54:23 > KingCrab72 banned Hicks31 (BanAll guthix1234). Reason: Griefing IP
00:54:23 > guthix1234 left the server (BanAll).
00:54:29 > Player Hicks31* logged in from an IP shared by banned players: bigkeat31, guthix1234, Hicks31
Looks like Hicks31 was fully connected and loading the main map while he was being banned. That's a fairly rare coincidence.

Re: Banned player remains online

Posted: February 23rd, 2012, 11:22 am
by AliceRed
I have experienced this issue numerous times in the same situation. Just kicking them is the only alternative, they won't be able to log in afterwards, normally.

Re: Banned player remains online

Posted: February 23rd, 2012, 2:11 pm
by BobKare
AliceRed wrote:I have experienced this issue numerous times in the same situation. Just kicking them is the only alternative, they won't be able to log in afterwards, normally.
Same. This has happened to me several times. It's not often, but it should be something fragmer should look into.

Re: Banned player remains online

Posted: February 23rd, 2012, 2:38 pm
by Intertoothh
BobKare wrote: It's not often, but it should be something fragmer should look into.
He did.
Fragmer wrote:Looks like Hicks31 was fully connected and loading the main map while he was being banned. That's a fairly rare coincidence.
And a simple kick will solve this.

Re: Banned player remains online

Posted: February 23rd, 2012, 2:42 pm
by fragmer
<technical details> I check whether the player is banned before "accepting" them into the server. There is a window of several milliseconds between the ban check and the acceptance in which the ban has to take place. Basically, a threading race condition. I'll see if I can move the ban-checking code into the thread-synchronized part of the code that deals with acceptance.

TLDR: I'll fix it.