summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2014-01-02 00:45:05 +0100
committerAlexander Barton <alex@barton.de>2014-01-02 00:45:05 +0100
commit2a40112f09cc58d43447cc2665b7924c8a69c580 (patch)
treeb73a2dd34f953f8773852924d30aaa6afdcc2ce0 /src
parent61b7932e82383f03cf751ff246c0610ce30dfd20 (diff)
parent1a628fff51fcfddde391e6c0f27686835e1b6d2e (diff)
downloadngircd-2a40112f09cc58d43447cc2665b7924c8a69c580.tar.gz
ngircd-2a40112f09cc58d43447cc2665b7924c8a69c580.zip
Merge branch 'bug167-WebircIPAnoDNS' of git://arthur.barton.de/ngircd-alex
* 'bug167-WebircIPAnoDNS' of git://arthur.barton.de/ngircd-alex:
  WEBIRC: Don't respect hostname when DNS is disabled
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc-login.c5
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;