From: Alexander Barton Date: Fri, 27 Dec 2013 21:34:47 +0000 (+0100) Subject: WEBIRC: Don't respect hostname when DNS is disabled X-Git-Tag: rel-21.1~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d009df909ba78d539bcddfd65e267840a3f1c0ee;p=ngircd WEBIRC: Don't respect hostname when DNS is disabled When DNS lookups are disabled, don't set the hostname received by the WEBIRC command, but use the IP address instead. Reported by Toni Spets , thanks! Closes bug #167. (cherry picked from commit 1a628fff51fcfddde391e6c0f27686835e1b6d2e) --- diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index 46952720..dc2f6e39 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -613,7 +613,10 @@ IRC_WEBIRC(CLIENT *Client, REQUEST *Req) Client_SetUser(Client, Req->argv[1], true); Client_SetOrigUser(Client, Req->argv[1]); - Client_SetHostname(Client, Req->argv[2]); + if (Conf_DNS) + Client_SetHostname(Client, Req->argv[2]); + else + Client_SetHostname(Client, Req->argv[3]); Client_SetIPAText(Client, Req->argv[3]); return CONNECTED;