m_server.c sending mismatched error messages

Jack L. xxjack12xx at doramail.com
Thu Dec 30 23:36:19 EST 2004


Fixed the error message and moved the checking up. Thanks.
----- Original Message -----
From: "Rachel Llorenna" <rachies at gmail.com>
To: "Mailing List: ircd-hybrid" <hybrid at lists.ircd-hybrid.org>
Subject: m_server.c sending mismatched error messages
Date: Thu, 30 Dec 2004 22:07:08 -0500

> 
> In m_server.c:
> 
> ms_sid:
>    if (strchr(SID_NAME, '.') == NULL || strlen(SID_NAME) > HOSTLEN) {
>      sendto_one(client_p, "ERROR :Invalid servername");
>      sendto_realops_flags(UMODE_ALL, L_ADMIN,
>                           "Link %s cancelled: servername name %s invalid",
>                           get_client_name(client_p, SHOW_IP), SID_NAME);
>      sendto_realops_flags(UMODE_ALL, L_OPER,
>                           "Link %s cancelled: Server/nick collision on %s",
>                           get_client_name(client_p, MASK_IP), SID_NAME);
>      exit_client(client_p, client_p, client_p, "Nick as Server");
>      return;
>    }
> 
> The error message being sent to admins differs from that being sent to
> opers... Perhaps it should just specify that the servername is
> invalid, instead of pointing out server/nickname ambiguity.
> 
> ms_server:
>    if (strchr(name, '.') == NULL)
>    {
>      /* Server trying to use the same name as a person. Would
>       * cause a fair bit of confusion. Enough to make it hellish
>       * for a while and servers to send stuff to the wrong place.
>       */
>      sendto_one(client_p,"ERROR :Nickname %s already exists!", name);
>      sendto_realops_flags(UMODE_ALL, L_ADMIN,
> 			   "Link %s cancelled: Server/nick collision on %s",
> 		/* inpath */ get_client_name(client_p, HIDE_IP), name);
>      sendto_realops_flags(UMODE_ALL, L_OPER,
>            "Link %s cancelled: Server/nick collision on %s",
> 	  get_client_name(client_p, MASK_IP), name);
>      exit_client(client_p, client_p, client_p, "Nick as Server");
>      return;
>    }
> 
> Perhaps also the HOSTLEN checking should be moved up into this
> section, before checking llines and hlines, for purposes of increasing
> efficiency.
> --
> Regards,
> 
> Rachel Llorenna (frequency)




                              ~Jack~

-- 
_______________________________________________
Get your free email from www.doramail.com with 30 Megs of disk space in webhosting and e-mail storage!


Powered by Outblaze




More information about the hybrid mailing list