From 031b788aad633ab347032f772bab8de05070040c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 8 Jan 2020 15:07:14 +0000 Subject: [PATCH] Follow requests counter --- follow.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/follow.py b/follow.py index 85ca2371b..68cfcd925 100644 --- a/follow.py +++ b/follow.py @@ -529,16 +529,18 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \ approveHandle=nickname+'@'+domainFull if followApprovalRequired(baseDir,nicknameToFollow, \ domainToFollow,debug,approveHandle): - if not domain.endswith('.onion'): + if not domain.endswith('.onion'): if noOfFollowRequests(baseDir, \ - nicknameToFollow, \ - domainToFollow,'') > 10: + nicknameToFollow,domainToFollow, \ + nickname,domain,fromPort, \ + '') > 10: print('Too many follow requests') return False else: if noOfFollowRequests(baseDir, \ - nicknameToFollow, \ - domainToFollow,'onion') > 5: + nicknameToFollow,domainToFollow, \ + nickname,domain,fromPort, \ + 'onion') > 5: print('Too many follow requests from onion addresses') return False