Closed Ghost-chu closed 2 weeks ago
Block is the same as Ban, I would imagine that the name, couldn't easily be changed at some point as in use by plugins.
@Override
public void
block(
String IPAddress)
{
filter.ban( IPAddress, "<plugin>", false );
}
@Override
public void
ban(
String IPAddress,
String text)
{
filter.ban( IPAddress, text, false );
}
If you want to expliclty block an address persistently then use ban/block.
Well, they're persistent if you have
Options->IP Filters: Save blocked IP details across restarts
enabled
Can I assume that I can use any of them and they will behave and act exactly the same?
Block === Ban, but use ban
can provide a custom reason
Yes.
Thank you for your time, answered all my doubts perfectly, have a good day :) ❤
Hope I'm right :)
Hello! I'm building a BiglyBT plugin and I'd like to dynamically add and remove IP filtering rules to block (and break) all estabilshed connections to addresses with specific IPs.
However, I see ban and block methods available, and even more confusingly I see both IPBanned[] and IPBlocked[]... This definitely threw me for a loop, because after looking at the source code, they seem to have the same content, but stored in different places.
Okay, I was hoping someone could clarify which method I should use if I need to dynamically block an IP address (and immediately cut off all its established connections)? And which collection should I use to view the record I've added and remove it from?
(I'm using translator, so it may looks weird.)