Add an argument to (not) match config X-lines. Just like the other arguments, this is optional and by default does nothing. This is a simple bool style argument so added a new MatchType enum and allow both "yes|no" and "true|false" to be used.
Rationale
A recent change to InspIRCd (see commit for reference) went from using <Config> to using the server name as the source of all config X-lines. That makes matching by -source=[!]<Config> not work, we could just use the server name or a wildcard mask, but since from_config has been available from 3.0.0 on, it's a more reliable choice. I say reliable because with xline_db some servers will have pre-3.0.0 X-lines which may have server names as the source but aren't config lines.
Testing Environment
I have tested this pull request on:
Operating system name and version: Ubuntu 16.04
Compiler name and version: GCC 5.4.0
Summary
Add an argument to (not) match config X-lines. Just like the other arguments, this is optional and by default does nothing. This is a simple bool style argument so added a new MatchType enum and allow both "yes|no" and "true|false" to be used.
Rationale
A recent change to InspIRCd (see commit for reference) went from using
<Config>
to using the server name as the source of all config X-lines. That makes matching by-source=[!]<Config>
not work, we could just use the server name or a wildcard mask, but sincefrom_config
has been available from 3.0.0 on, it's a more reliable choice. I say reliable because with xline_db some servers will have pre-3.0.0 X-lines which may have server names as the source but aren't config lines.Testing Environment
I have tested this pull request on:
Operating system name and version: Ubuntu 16.04 Compiler name and version: GCC 5.4.0