Last modified: 2013-10-27 23:33:21 UTC
There is no documentation on this function and guessing has got me nowhere.
I tried this:
but no go. Is a user_ip variable no available? Does the user_name hold ip addresses for anonymous users? I need to check the IPs of registered users.
Same question brought up here:
Wondering if docs could be linked to https://www.mediawiki.org/wiki/Help:Range_blocks
Call is "ip_in_range(ip, range)" and that is delegated to MediaWiki's IP::isInRange
A help text for the scroll down box on [[Special:AbuseFilter/test]] exists ("Is IP in range? (ip_in_range)")
Andre, the main question is what variable to use for the first parameter for the user's IP address.
The AbuseFilter does not allow you to use the IP address of a registered user. The ip_in_range function is supposed to be used for anonymous users, when you want a filter to target a specific range rather than everyone.
Kunal, why not? Is there some wiki philosophy or guiding principle that I am not aware of? Confused.
With the abusefilter-private user right, you can see the ip of the user, which trigged the filter. On WMF wikis this is not available, due to private policy. Only CheckUsers are allowed to see the ip of a user.
It looks like there is no way to filter against this field, because than the filter and the log details must be hidden to avoid other users to see the ip or with help of the filter regex to determine a possible ip.
My solution was to create a new filter variable, user_ip. So, the IP doesn't need to be shown in the log. It's not even worth me pasting the code it's so easy.