diff options
-rw-r--r-- | include/socket.h | 7 | ||||
-rw-r--r-- | src/listensocket.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_check.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_httpd_stats.cpp | 2 | ||||
-rw-r--r-- | src/server.cpp | 1 |
5 files changed, 4 insertions, 12 deletions
diff --git a/include/socket.h b/include/socket.h index 3abbeef32..c54517a76 100644 --- a/include/socket.h +++ b/include/socket.h @@ -124,13 +124,6 @@ namespace irc * @return true if the conversion was successful, false if unknown address family */ CoreExport bool satoap(const irc::sockets::sockaddrs& sa, std::string& addr, int &port); - - /** Convert a binary sockaddr to a user-readable string. - * This means IPv6 addresses are written as [::1]:6667, and *:6668 is used for 0.0.0.0:6668 - * @param sa The structure to convert - * @return The string; "<unknown>" if not a valid address - */ - inline std::string satouser(const irc::sockets::sockaddrs& sa) { return sa.str(); } } } diff --git a/src/listensocket.cpp b/src/listensocket.cpp index ca518c59e..108466ae3 100644 --- a/src/listensocket.cpp +++ b/src/listensocket.cpp @@ -30,7 +30,7 @@ ListenSocket::ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_t : bind_tag(tag) { irc::sockets::satoap(bind_to, bind_addr, bind_port); - bind_desc = irc::sockets::satouser(bind_to); + bind_desc = bind_to.str(); fd = socket(bind_to.sa.sa_family, SOCK_STREAM, 0); diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 5e154feea..84e147f7b 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -180,8 +180,8 @@ class CommandCheck : public Command if (loctarg) { - user->SendText(checkstr + " clientaddr " + irc::sockets::satouser(loctarg->client_sa)); - user->SendText(checkstr + " serveraddr " + irc::sockets::satouser(loctarg->server_sa)); + user->SendText(checkstr + " clientaddr " + loctarg->client_sa.str()); + user->SendText(checkstr + " serveraddr " + loctarg->server_sa.str()); std::string classname = loctarg->GetClass()->name; if (!classname.empty()) diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index 5114b26d5..346fe41f5 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -197,7 +197,7 @@ class ModuleHttpStats : public Module LocalUser* lu = IS_LOCAL(u); if (lu) data << "<port>" << lu->GetServerPort() << "</port><servaddr>" - << irc::sockets::satouser(lu->server_sa) << "</servaddr>"; + << lu->server_sa.str() << "</servaddr>"; data << "<ipaddress>" << u->GetIPString() << "</ipaddress>"; DumpMeta(data, u); diff --git a/src/server.cpp b/src/server.cpp index 4974b8501..1d1f52641 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -172,7 +172,6 @@ void ISupportManager::Build() tokens["CHANMODES"] = ServerInstance->Modes->GiveModeList(MASK_CHANNEL); tokens["CHANNELLEN"] = ConvToStr(ServerInstance->Config->Limits.ChanMax); tokens["CHANTYPES"] = "#"; - tokens["CHARSET"] = "ascii"; tokens["ELIST"] = "MU"; tokens["KICKLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxKick); tokens["MAXBANS"] = "64"; // TODO: make this a config setting. |