I was thinking of, say an npub posted illegal material (like the sort nostrbuild autodetects). Could a client be like nah, mate you're barred...? Suppose that would be understandable really. No? Or would that be against the principles of Nostr? (I'm not entirely sure it would be, maybe?)
Discussion
I actually don't think that's possible with the way most clients are created. It would be pretty anti-nostr though if you ask me, even if the content was illegal.
You could get permanently banned from posting to a specific relay if you're posting stuff that they don't agree with or is illegal. But as far as I'm aware, I don't think there's any mechanism for a client to ban a user.
It would be against the principles of the anti-censorship side of nostr but it would fit with the principles of the anti-being-censored-but-pro-censoring-others side of nostr
Web clients do block IP addresses from accessing them, any client that has a centralized element like a web client's website could do the same. Clients without centralized elements, solely relying on a transferable app and relays, can't really block users.
Any client that has access to your nsec can do some stuff to just fuck up your npub for you. A client could block everyone you follow and send constant spam to get you blocked too, until it loses access to your key. Browser extensions like nos2x can sign individual events to avoid this, or grant temporary signing permission to mitigate it, but nos2x itself could still hypothetically meet with some new malware code to do shit like that. You'd still ultimately be able to use the messed up npub though, or just switch to a new one
I should also add, it's web client instances that block users. Most of them are open-source so you could just host your own instance and not block your own IP address
One more thing: the biggest relays have much more power to silence someone than any client