- /** Tag name. */
- std::string tag;
-
- /** Attribute key. */
- std::string key;
-
- /** Attribute value. */
- std::string value;
-
- /** Reason for deprecation. */
- std::string reason;
-};
-
-static const DeprecatedConfig ChangedConfig[] = {
- { "bind", "transport", "", "has been moved to <bind:ssl> as of 2.0" },
- { "die", "value", "", "you need to reread your config" },
- { "gnutls", "starttls", "", "has been replaced with m_starttls as of 3.0" },
- { "link", "autoconnect", "", "2.0+ does not use this attribute - define <autoconnect> tags instead" },
- { "link", "transport", "", "has been moved to <link:ssl> as of 2.0" },
- { "module", "name", "m_chanprotect.so", "has been replaced with m_customprefix as of 3.0" },
- { "module", "name", "m_halfop.so", "has been replaced with m_customprefix as of 3.0" },
- { "options", "cyclehosts", "", "has been replaced with m_hostcycle as of 3.0" },
- { "performance", "nouserdns", "", "has been moved to <connect:resolvehostnames> as of 3.0" }
-};
+#ifndef _WIN32
+ char hostname[256];
+ if (gethostname(hostname, sizeof(hostname)) == 0)
+ {
+ std::string name(hostname);
+ if (name.find('.') == std::string::npos)
+ name.push_back('.');
+
+ if (name.length() <= ServerInstance->Config->Limits.MaxHost && InspIRCd::IsHost(name))
+ return name;
+ }
+#endif
+ return "irc.example.com";
+}