forked from indymedia/epicyon
Follow requests counter
parent
375ec206fd
commit
031b788aad
12
follow.py
12
follow.py
|
@ -529,16 +529,18 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \
|
||||||
approveHandle=nickname+'@'+domainFull
|
approveHandle=nickname+'@'+domainFull
|
||||||
if followApprovalRequired(baseDir,nicknameToFollow, \
|
if followApprovalRequired(baseDir,nicknameToFollow, \
|
||||||
domainToFollow,debug,approveHandle):
|
domainToFollow,debug,approveHandle):
|
||||||
if not domain.endswith('.onion'):
|
if not domain.endswith('.onion'):
|
||||||
if noOfFollowRequests(baseDir, \
|
if noOfFollowRequests(baseDir, \
|
||||||
nicknameToFollow, \
|
nicknameToFollow,domainToFollow, \
|
||||||
domainToFollow,'') > 10:
|
nickname,domain,fromPort, \
|
||||||
|
'') > 10:
|
||||||
print('Too many follow requests')
|
print('Too many follow requests')
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
if noOfFollowRequests(baseDir, \
|
if noOfFollowRequests(baseDir, \
|
||||||
nicknameToFollow, \
|
nicknameToFollow,domainToFollow, \
|
||||||
domainToFollow,'onion') > 5:
|
nickname,domain,fromPort, \
|
||||||
|
'onion') > 5:
|
||||||
print('Too many follow requests from onion addresses')
|
print('Too many follow requests from onion addresses')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue