Conf_GetServer() can return NULL when the server introducing the client
had a write error for example, and is being disconnected.
So make sure that we have a valid server before calling Conf_NickIsService()!
GLOBAL void
Client_Introduce(CLIENT *From, CLIENT *Client, int Type)
{
GLOBAL void
Client_Introduce(CLIENT *From, CLIENT *Client, int Type)
{
/* Set client type (user or service) */
Client_SetType(Client, Type);
if (From) {
/* Set client type (user or service) */
Client_SetType(Client, Type);
if (From) {
- if (Conf_NickIsService(Conf_GetServer(Client_Conn(From)),
- Client_ID(Client)))
+ server = Conf_GetServer(Client_Conn(From));
+ if (server > NONE && Conf_NickIsService(server, Client_ID(Client)))
Client_SetType(Client, CLIENT_SERVICE);
LogDebug("%s \"%s\" (+%s) registered (via %s, on %s, %d hop%s).",
Client_TypeText(Client), Client_Mask(Client),
Client_SetType(Client, CLIENT_SERVICE);
LogDebug("%s \"%s\" (+%s) registered (via %s, on %s, %d hop%s).",
Client_TypeText(Client), Client_Mask(Client),