]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Enhance "ServiceMask" to handle a list of masks
authorAlexander Barton <alex@barton.de>
Sun, 26 Aug 2012 11:24:54 +0000 (13:24 +0200)
committerAlexander Barton <alex@barton.de>
Sun, 26 Aug 2012 11:24:54 +0000 (13:24 +0200)
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).

doc/sample-ngircd.conf.tmpl
man/ngircd.conf.5.tmpl
src/ngircd/conf.c

index 6d9d77098641ec4459375d56eb2a5a0d405dbd92..57e65892054b9bd20c1d2cc309dd9ccaca1c1a41 100644 (file)
        # Connect to the remote server using TLS/SSL (Default: false)
        ;SSLConnect = yes
 
        # Connect to the remote server using TLS/SSL (Default: false)
        ;SSLConnect = yes
 
-       # Define a (case insensitive) mask matching nick names that should be
-       # treated as IRC services when introduced via this remote server.
+       # Define a (case insensitive) list of masks matching nick names that
+       # 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
        # (which is the default).
        # 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", you should set this parameter to
        # REGULAR SERVERS DON'T NEED this parameter, so leave it empty
        # (which is the default).
        # 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", you should set this parameter to
-       # something like "*Serv".
-       ;ServiceMask = *Serv
+       # something like "*Serv" or "NickServ,ChanServ,XyzServ".
+       ;ServiceMask = *Serv,Global
 
 [Server]
        # More [Server] sections, if you like ...
 
 [Server]
        # More [Server] sections, if you like ...
index 71f0007851e738222ed7064b71921d4bb09cd097..aff11a67bf86ec6c79d0daae9cfadeff345662f2 100644 (file)
@@ -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.
 .TP
 \fBServiceMask\fR (string)
 Connect to the remote server using TLS/SSL. Default: false.
 .TP
 \fBServiceMask\fR (string)
-Define a (case insensitive) mask matching nick names that should be treated as
-IRC services when introduced via this remote server. REGULAR SERVERS DON'T NEED
-this parameter, so leave it empty (which is the default).
+Define a (case insensitive) list of masks matching nick names that 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
+(which is the default).
 .PP
 .RS
 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",
 .PP
 .RS
 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",
-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]
 Pre-defined channels can be configured in
 .I [Channel]
 .SH [CHANNEL]
 Pre-defined channels can be configured in
 .I [Channel]
index 41b5469a8140f4c5a07d1874dd6d048fcbf6ae3b..3966dc908a1afff2bf5a95901c8cff6427b91524 100644 (file)
@@ -648,7 +648,8 @@ Conf_NickIsService(int ConfServer, const char *Nick)
        assert (ConfServer >= 0);
        assert (ConfServer < MAX_SERVERS);
 
        assert (ConfServer >= 0);
        assert (ConfServer < MAX_SERVERS);
 
-       return MatchCaseInsensitive(Conf_Server[ConfServer].svs_mask, Nick);
+       return MatchCaseInsensitiveList(Conf_Server[ConfServer].svs_mask,
+                                       Nick, ",");
 }
 
 /**
 }
 
 /**