Make is_user_stasised return a truthy value if the user is not found
This ensures that code paths that should not be run if the user is stasised are not run if we don't know the user's status. Generally we don't know the user's status because they are not in the main channel, and therefore allowing them to effectively bypass stasis by not being around is a bad thing. We return -1 to differentiate between actual stasis, and because -1 is still True when cast to boolean. This may have the effect of giving some very odd-looking error messages but that's a very minor issue.
This commit is contained in:
parent
8a71c839a9
commit
48547972e9
@ -7797,7 +7797,7 @@ def is_user_stasised(nick):
|
||||
host = var.USERS[nick]["host"]
|
||||
acc = var.USERS[nick]["account"]
|
||||
else:
|
||||
return 0
|
||||
return -1
|
||||
amount = 0
|
||||
if not var.DISABLE_ACCOUNTS and acc and acc != "*":
|
||||
if acc in var.STASISED_ACCS:
|
||||
|
Loading…
x
Reference in New Issue
Block a user