Enhance "ServiceMask" to handle a list of masks
The "ServiceMask" variable in "Server" blocks now can handle more than
one mask using the new MatchCaseInsensitiveList() function.
This makes marking "service clients" much more specific, which is a
good thing per se, but which is the prerequisite for reasonably
blocking these nick names, too (see commit a6dd2e3
for details).
This commit is contained in:
parent
ab1fcebeff
commit
360a254be0
|
@ -297,15 +297,16 @@
|
||||||
# Connect to the remote server using TLS/SSL (Default: false)
|
# Connect to the remote server using TLS/SSL (Default: false)
|
||||||
;SSLConnect = yes
|
;SSLConnect = yes
|
||||||
|
|
||||||
# Define a (case insensitive) mask matching nick names that should be
|
# Define a (case insensitive) list of masks matching nick names that
|
||||||
# treated as IRC services when introduced via this remote server.
|
# should be treated as IRC services when introduced via this remote
|
||||||
|
# server, separated by commas (",").
|
||||||
# REGULAR SERVERS DON'T NEED this parameter, so leave it empty
|
# REGULAR SERVERS DON'T NEED this parameter, so leave it empty
|
||||||
# (which is the default).
|
# (which is the default).
|
||||||
# When you are connecting IRC services which mask as a IRC server
|
# When you are connecting IRC services which mask as a IRC server
|
||||||
# and which use "virtual users" to communicate with, for example
|
# and which use "virtual users" to communicate with, for example
|
||||||
# "NickServ" and "ChanServ", you should set this parameter to
|
# "NickServ" and "ChanServ", you should set this parameter to
|
||||||
# something like "*Serv".
|
# something like "*Serv" or "NickServ,ChanServ,XyzServ".
|
||||||
;ServiceMask = *Serv
|
;ServiceMask = *Serv,Global
|
||||||
|
|
||||||
[Server]
|
[Server]
|
||||||
# More [Server] sections, if you like ...
|
# More [Server] sections, if you like ...
|
||||||
|
|
|
@ -422,14 +422,16 @@ You can use the IRC Operator command CONNECT later on to create the link.
|
||||||
Connect to the remote server using TLS/SSL. Default: false.
|
Connect to the remote server using TLS/SSL. Default: false.
|
||||||
.TP
|
.TP
|
||||||
\fBServiceMask\fR (string)
|
\fBServiceMask\fR (string)
|
||||||
Define a (case insensitive) mask matching nick names that should be treated as
|
Define a (case insensitive) list of masks matching nick names that should be
|
||||||
IRC services when introduced via this remote server. REGULAR SERVERS DON'T NEED
|
treated as IRC services when introduced via this remote server, separated
|
||||||
this parameter, so leave it empty (which is the default).
|
by commas (","). REGULAR SERVERS DON'T NEED this parameter, so leave it empty
|
||||||
|
(which is the default).
|
||||||
.PP
|
.PP
|
||||||
.RS
|
.RS
|
||||||
When you are connecting IRC services which mask as a IRC server and which use
|
When you are connecting IRC services which mask as a IRC server and which use
|
||||||
"virtual users" to communicate with, for example "NickServ" and "ChanServ",
|
"virtual users" to communicate with, for example "NickServ" and "ChanServ",
|
||||||
you should set this parameter to something like "*Serv".
|
you should set this parameter to something like "*Serv", "*Serv,OtherNick",
|
||||||
|
or "NickServ,ChanServ,XyzServ".
|
||||||
.SH [CHANNEL]
|
.SH [CHANNEL]
|
||||||
Pre-defined channels can be configured in
|
Pre-defined channels can be configured in
|
||||||
.I [Channel]
|
.I [Channel]
|
||||||
|
|
|
@ -648,7 +648,8 @@ Conf_NickIsService(int ConfServer, const char *Nick)
|
||||||
assert (ConfServer >= 0);
|
assert (ConfServer >= 0);
|
||||||
assert (ConfServer < MAX_SERVERS);
|
assert (ConfServer < MAX_SERVERS);
|
||||||
|
|
||||||
return MatchCaseInsensitive(Conf_Server[ConfServer].svs_mask, Nick);
|
return MatchCaseInsensitiveList(Conf_Server[ConfServer].svs_mask,
|
||||||
|
Nick, ",");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue