]> arthur.barton.de Git - ngircd-alex.git/commitdiff
LINKS command: support <mask> parameter
authorAlexander Barton <alex@barton.de>
Wed, 4 Jan 2012 21:51:02 +0000 (22:51 +0100)
committerAlexander Barton <alex@barton.de>
Wed, 4 Jan 2012 21:51:02 +0000 (22:51 +0100)
The <mask> can be used to limit the servers shown in the listing.

src/ngircd/irc-info.c

index dfc67b9b7660151da04b1e4fc9559bccef829c67..5e56949f553b92d1ed3154863313bd3700b56668 100644 (file)
@@ -254,7 +254,8 @@ IRC_LINKS(CLIENT *Client, REQUEST *Req)
 
        c = Client_First();
        while (c) {
-               if (Client_Type(c) == CLIENT_SERVER) {
+               if (Client_Type(c) == CLIENT_SERVER
+                   && MatchCaseInsensitive(mask, Client_ID(c))) {
                        if (!IRC_WriteStrClient(from, RPL_LINKS_MSG,
                                        Client_ID(from), Client_ID(c),
                                        Client_ID(Client_TopServer(c)