diff options
| author | Alexander Barton <alex@barton.de> | 2013-12-27 22:34:47 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2013-12-27 22:34:47 +0100 |
| commit | 1a628fff51fcfddde391e6c0f27686835e1b6d2e (patch) | |
| tree | 3700493507b6ef6d40e166f958221809a83327a3 | |
| parent | bd33bd770decd470577487fa4bd399cb1d8426fc (diff) | |
| download | ngircd-1a628fff51fcfddde391e6c0f27686835e1b6d2e.tar.gz ngircd-1a628fff51fcfddde391e6c0f27686835e1b6d2e.zip | |
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 <toni.spets@iki.fi>, thanks! Closes bug #167.
| -rw-r--r-- | src/ngircd/irc-login.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index 9e7e2d7a..b7fe5fed 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -609,7 +609,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; |