From 66e062677f38b828398bd601f851b7331f599ee6 Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 26 May 2020 00:54:04 +0100 Subject: [PATCH] Check buddy request hasn't already been accepted --- houdini/handlers/play/buddy.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/houdini/handlers/play/buddy.py b/houdini/handlers/play/buddy.py index 80f933b..ad8a77a 100644 --- a/houdini/handlers/play/buddy.py +++ b/houdini/handlers/play/buddy.py @@ -148,6 +148,9 @@ async def handle_buddy_accept(p, buddy_id: int): else: return + if buddy_id in p.buddies: + return + await p.buddies.insert(buddy_id=buddy_id) if buddy_id in p.server.penguins_by_id: