OceanSlim on Nostr: I got the temp ban count working right and it adds to the permaban list once ...
I got the temp ban count working right and it adds to the permaban list once exceeded. Removing still requires a hard restart. I may just leave that...
It had to do with resetting the count when the temp expired. Now I return false. Then I had to move the mutex lock out of the addition to the permaban list and handle it in addition to temp list.
Blacklist also overrides whitelist (in case you want to whitelist a whole domain but still block certain keys)
How does all this sound?
Published at
2024-08-16 13:26:25Event JSON
{
"id": "2405692e969deccf92900324a385d224e1ed3c31529cccfb793f0354e10731eb",
"pubkey": "16f1a0100d4cfffbcc4230e8e0e4290cc5849c1adc64d6653fda07c031b1074b",
"created_at": 1723814785,
"kind": 1,
"tags": [
[
"e",
"7a4d6f3c97395085a79af07d2b136368a54a72d4bc522361c71b9c3bf59a5926",
"",
"root"
],
[
"e",
"e57a8335282cdcf1550721bb1ae135ee1fb4c637af008d25618d145590de9f58",
"",
"reply"
],
[
"p",
"16f1a0100d4cfffbcc4230e8e0e4290cc5849c1adc64d6653fda07c031b1074b"
],
[
"p",
"3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
]
],
"content": "I got the temp ban count working right and it adds to the permaban list once exceeded. Removing still requires a hard restart. I may just leave that... \n\nIt had to do with resetting the count when the temp expired. Now I return false. Then I had to move the mutex lock out of the addition to the permaban list and handle it in addition to temp list. \n\nBlacklist also overrides whitelist (in case you want to whitelist a whole domain but still block certain keys) \n\nHow does all this sound? ",
"sig": "78a45b7022cd2e3d4a35d0378dfa05004ac5207c270c36a2462e417a87971dd7a9f1046b06a256ade8fb6512acc2951d162c43a9f973c141c1286785f36d088c"
}