From 795e97f428b44ee91e6b262b76489eade89f176c Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Mon, 28 Mar 2016 00:31:00 -0400 Subject: identd: Fix respecting USE_GLOBAL network flag --- src/common/server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/server.c b/src/common/server.c index b94f57e7..5bf2706f 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -836,6 +836,7 @@ server_read_child (GIOChannel *source, GIOCondition condition, server *serv) struct sockaddr addr; int addr_len = sizeof (addr); guint16 port; + ircnet *net = serv->network; if (!getsockname (serv->sok, &addr, &addr_len)) { @@ -845,8 +846,8 @@ server_read_child (GIOChannel *source, GIOCondition condition, server *serv) port = ntohs(((struct sockaddr_in6 *)&addr)->sin6_port); g_snprintf (outbuf, sizeof (outbuf), "IDENTD %"G_GUINT16_FORMAT" ", port); - if (serv->network && ((ircnet *)serv->network)->user) - g_strlcat (outbuf, ((ircnet *)serv->network)->user, sizeof (outbuf)); + if (net && net->user && !(net->flags & FLAG_USE_GLOBAL)) + g_strlcat (outbuf, net->user, sizeof (outbuf)); else g_strlcat (outbuf, prefs.hex_irc_user_name, sizeof (outbuf)); -- cgit 1.4.1