Civcraft / NameLayer

Do not open issues here; open them on the maintained fork @ DevotedMC
https://github.com/DevotedMC/NameLayer
BSD 3-Clause "New" or "Revised" License
4 stars 14 forks source link

Fix invites across shards #154

Closed idoash4 closed 8 years ago

idoash4 commented 8 years ago

@rourke750

CivcraftBot commented 8 years ago

Can one of the admins verify this patch? Type 'ok to test' to test.

rourke750 commented 8 years ago

ok to test

rourke750 commented 8 years ago

Yay. I'll look over when im home

ttk2 commented 8 years ago

so whats the status of this?

ProgrammerDan commented 8 years ago

@BlackXnt The only issue I see is this:

If you send an invite to someone who doesn't have auto-accept turned on at membership level MEMBERS, but realize you need to add them as MODS, the second /nlip will generate a second invitation.

Fix should be simple -- use an "add or update" approach to invitation storage. Simply changing the DB layer will likely suffice, leave all your front code as is (interaction handling doesn't care if an invitation already exists or not, only if they are a member or not).

idoash4 commented 8 years ago

@ProgrammerDan Completely forgot to handle duplicate invitations. Should be good now.

Maxopoly commented 8 years ago

Is this ready for merge?

idoash4 commented 8 years ago

@erocs Good to merge?

erocs commented 8 years ago

Should be, although I screwed up inviteplayer for you. I can merge if you want.

On Sun, Jan 17, 2016 at 7:23 AM, BlackXnt notifications@github.com wrote:

@erocs https://github.com/erocs Good to merge?

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/NameLayer/pull/154#issuecomment-172338484.

idoash4 commented 8 years ago

I already fixed it with my last commit. Tested it on Civtest. Your change to inviteplayer is working as well.