diff options
author | Patrick Griffis <tingping@tingping.se> | 2016-03-28 00:31:00 -0400 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2016-03-28 00:31:00 -0400 |
commit | 795e97f428b44ee91e6b262b76489eade89f176c (patch) | |
tree | f7e3ae08ad0bc0994dd0a5f05b4a153d854de4d3 /src/common | |
parent | 77ac0863f80b4dfac878ce3f6deddca0c8c68f87 (diff) |
identd: Fix respecting USE_GLOBAL network flag
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/server.c | 5 |
1 files changed, 3 insertions, 2 deletions
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)); |