From c75948ca1d91ef100984f7a94f77619e35962dc3 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Fri, 7 Apr 2017 17:29:37 -0700 Subject: [PATCH] Switch to IP ratelimiting for guilds --- titanembeds/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/titanembeds/utils.py b/titanembeds/utils.py index 5de8fcd..d738e81 100644 --- a/titanembeds/utils.py +++ b/titanembeds/utils.py @@ -48,9 +48,9 @@ def channel_ratelimit_key(): # Generate a bucket with given channel & unique ses return (sess + channel_id).encode('utf-8') def guild_ratelimit_key(): - sess = generate_session_key() + ip = get_client_ipaddr() guild_id = request.values.get('guild_id', "0") - return (sess + guild_id).encode('utf-8') + return (ip + guild_id).encode('utf-8') def check_guild_existance(guild_id): dbGuild = Guilds.query.filter_by(guild_id=guild_id).first()