diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-24 18:46:24 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-24 18:46:24 +0000 |
commit | 7770edd7037180c4a49771beb89519874a650668 (patch) | |
tree | 530596131af10d73e06fc0b11ed404438c652430 | |
parent | 31eb647e2bdb922f4c1d6d56d493e268d41c110b (diff) |
Two things, document how InspIRCd finds the dns server ip on windows if you don't specify one,
and have win32 default to 127.0.0.1 for dns queries in the very unlikely chance you have no
network interfaces active.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7129 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | docs/inspircd.conf.example | 12 | ||||
-rw-r--r-- | win/inspircd_win32wrapper.cpp | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/docs/inspircd.conf.example b/docs/inspircd.conf.example index 7f8822d8f..080fa3a6e 100644 --- a/docs/inspircd.conf.example +++ b/docs/inspircd.conf.example @@ -599,10 +599,14 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-# DNS SERVER -#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # # # Define your DNS server address here. InspIRCd has its own resolver. # -# If you do not define this value, the first dns server from your # -# /etc/resolv.conf file is read. If no entries are found in this file # -# or the file cannot be opened, the default value '127.0.0.1' is used # -# instead. The timeout value is in seconds. # +# If you do not define this value, then then InspIRCd will attempt to # +# determine your DNS server from your operating system. On POSIX # +# platforms, InspIRCd will read /etc/resolv.conf, and populate this # +# value with the first DNS server address found. On Windows platforms # +# InspIRCd will check the registry, and use the DNS server of the # +# first active network interface, if one exists. # +# If a DNS server cannot be determined from these checks, the default # +# value '127.0.0.1' is used instead. The timeout value is in seconds. # # # # ____ _ _____ _ _ ____ _ _ _ # # | _ \ ___ __ _ __| | |_ _| |__ (_)___ | __ )(_) |_| | # diff --git a/win/inspircd_win32wrapper.cpp b/win/inspircd_win32wrapper.cpp index 1cdd46444..017ed4808 100644 --- a/win/inspircd_win32wrapper.cpp +++ b/win/inspircd_win32wrapper.cpp @@ -414,7 +414,7 @@ bool GetInterface(HKEY regkey, const char *key, char* &output) std::string FindNameServerWin()
{
- std::string returnval;
+ std::string returnval = "127.0.0.1";
HKEY top, key;
char* dns = NULL;
|