Page 1 of 1

Control the re-entering the game after CD

Posted: Mon Dec 28, 2020 1:12 am
by Flame
I know that it's already done in webDip sourse code.
Scripts control the player re-entering the game for another power after being kicked out due to CD.

Who can point me the file and the code-line where it is written down?

Re: Control the re-entering the game after CD

Posted: Mon Dec 28, 2020 10:27 am
by Flame
I mean after CD the power is already taken by other player. And I want the code which prevents the old owner of the power to get into the game for another country.

Re: Control the re-entering the game after CD

Posted: Tue Dec 29, 2020 3:00 am
by Flame
I didn't find this in webDip sourcecode too.
I think it is considered to be a bug.

Re: Control the re-entering the game after CD

Posted: Tue Dec 29, 2020 5:49 am
by A_Tin_Can
I’m pretty sure it’s in there. I don’t have time to look right now, but I remember seeing the check in the join game code (have a look for anything that writes to the wd_members table). From memory, the check is not explicit, but implied.

If there’s a bug where you are able to take over another power when you CD, get taken over, and then someone else CDs, I think it would be the easy fix of checking the CD table too.

It would be easy to confirm that the code isn’t there by looking for everything that reads the CD table.

Re: Control the re-entering the game after CD

Posted: Tue Dec 29, 2020 8:04 am
by Flame
A_Tin_Can wrote:
Tue Dec 29, 2020 5:49 am
I’m pretty sure it’s in there. I don’t have time to look right now, but I remember seeing the check in the join game code (have a look for anything that writes to the wd_members table). From memory, the check is not explicit, but implied.

If there’s a bug where you are able to take over another power when you CD, get taken over, and then someone else CDs, I think it would be the easy fix of checking the CD table too.

It would be easy to confirm that the code isn’t there by looking for everything that reads the CD table.
I see. Thank you for your reply.
Besides, I'm not sure banned users are out of halloffame.
Anyway I do this fix for Ru-server.

Re: Control the re-entering the game after CD

Posted: Wed Dec 30, 2020 6:05 am
by jmo1121109
I don't think it's a bug, if you check the comment on line 79 of webDiplomacy\board\member.php from Kestas you'll see this.

Code: Select all

/*
		 * Remove the CD mark from this person's record
		 * Someone could possible go into CD, be taken over, join another country, go CD again, then rejoin, so country has to be specified
		 */
Sounds like this was intended functionality on his part.

Re: Control the re-entering the game after CD

Posted: Wed Dec 30, 2020 6:06 am
by jmo1121109
jmo1121109 wrote:
Wed Dec 30, 2020 6:05 am
I don't think it's a bug, if you check the comment on line 79 of webDiplomacy\board\member.php from Kestas you'll see this.

Code: Select all

/*
		 * Remove the CD mark from this person's record
		 * Someone could possible go into CD, be taken over, join another country, go CD again, then rejoin, so country has to be specified
		 */
Sounds like this was intended functionality on his part.
That said, I could swear ATC is right and there is a check that was added later that was implied, but I only skimmed the code for 2 minutes to find this.

Re: Control the re-entering the game after CD

Posted: Wed Dec 30, 2020 9:16 pm
by Flame
Thank you for attention to my request. I will continue the investigation ))