]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Improve server notices for hub_mask/leaf_mask.
authorJilles Tjoelker <redacted>
Fri, 5 Sep 2008 23:21:16 +0000 (01:21 +0200)
committerJilles Tjoelker <redacted>
Fri, 5 Sep 2008 23:21:16 +0000 (01:21 +0200)
Local-only server notices kept here because
hub_mask/leaf_mask tends to be specific to a (hub)
server. The same information is now available in
Netsplit notices.

modules/core/m_server.c

index 72c9b84977329fe117dbd948c09398db3190db82..ba3d4467dc7a3a85aea15af9b5c7fb040ea8fcde 100644 (file)
@@ -388,7 +388,10 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
                ilog(L_SERVER, "Non-Hub link %s introduced %s.",
                        client_p->name, name);
 
-               exit_client(NULL, client_p, &me, "No matching hub_mask.");
+               rb_snprintf(squitreason, sizeof squitreason,
+                               "No matching hub_mask for %s",
+                               name);
+               exit_client(NULL, client_p, &me, squitreason);
                return 0;
        }
 
@@ -402,7 +405,10 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
                ilog(L_SERVER, "Link %s introduced leafed server %s.",
                        client_p->name, name);  
 
-               exit_client(NULL, client_p, &me, "Leafed Server.");
+               rb_snprintf(squitreason, sizeof squitreason,
+                               "Matching leaf_mask for %s",
+                               name);
+               exit_client(NULL, client_p, &me, squitreason);
                return 0;
        }
 
@@ -550,26 +556,32 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
        /* no matching hub_mask */
        if(!hlined)
        {
-               sendto_one(client_p, "ERROR :No matching hub_mask");
                sendto_realops_snomask(SNO_GENERAL, L_ALL,
                                     "Non-Hub link %s introduced %s.",
                                     client_p->name, parv[1]);
                ilog(L_SERVER, "Non-Hub link %s introduced %s.",
                        client_p->name, parv[1]);
-               exit_client(NULL, client_p, &me, "No matching hub_mask.");
+
+               rb_snprintf(squitreason, sizeof squitreason,
+                               "No matching hub_mask for %s",
+                               parv[1]);
+               exit_client(NULL, client_p, &me, squitreason);
                return 0;
        }
 
        /* matching leaf_mask */
        if(llined)
        {
-               sendto_one(client_p, "ERROR :Matching leaf_mask");
                sendto_realops_snomask(SNO_GENERAL, L_ALL,
                                     "Link %s introduced leafed server %s.",
                                     client_p->name, parv[1]);
                ilog(L_SERVER, "Link %s introduced leafed server %s.",
                        client_p->name, parv[1]);       
-               exit_client(NULL, client_p, &me, "Leafed Server.");
+
+               rb_snprintf(squitreason, sizeof squitreason,
+                               "Matching leaf_mask for %s",
+                               parv[1]);
+               exit_client(NULL, client_p, &me, squitreason);
                return 0;
        }