mirror of https://gitlab.com/bashrc2/epicyon
Don't block self
parent
e52dde8027
commit
78fba638c3
|
@ -60,6 +60,10 @@ def addBlock(baseDir: str, nickname: str, domain: str,
|
||||||
blockNickname: str, blockDomain: str) -> bool:
|
blockNickname: str, blockDomain: str) -> bool:
|
||||||
"""Block the given account
|
"""Block the given account
|
||||||
"""
|
"""
|
||||||
|
if blockDomain.startswith(domain) and nickname == blockNickname:
|
||||||
|
# don't block self
|
||||||
|
return False
|
||||||
|
|
||||||
domain = removeDomainPort(domain)
|
domain = removeDomainPort(domain)
|
||||||
blockingFilename = acctDir(baseDir, nickname, domain) + '/blocking.txt'
|
blockingFilename = acctDir(baseDir, nickname, domain) + '/blocking.txt'
|
||||||
blockHandle = blockNickname + '@' + blockDomain
|
blockHandle = blockNickname + '@' + blockDomain
|
||||||
|
|
Loading…
Reference in New Issue