summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd_stats.cpp4
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp3
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp3
-rw-r--r--src/socket.cpp2
4 files changed, 8 insertions, 4 deletions
diff --git a/src/cmd_stats.cpp b/src/cmd_stats.cpp
index 9b1893a3c..5b11d33ed 100644
--- a/src/cmd_stats.cpp
+++ b/src/cmd_stats.cpp
@@ -60,18 +60,16 @@ void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user, string_lis
case 'p':
{
std::map<int,int> pc;
-
for (std::vector<userrec*>::const_iterator i = ServerInstance->local_users.begin(); i != ServerInstance->local_users.end(); i++)
{
userrec* t = (userrec*)(*i);
if (t->registered == REG_ALL)
pc[t->GetPort()]++;
}
-
for (unsigned int i = 0; i < ServerInstance->stats->BoundPortCount; i++)
{
results.push_back(sn+" 249 "+user->nick+" :p:"+ConvToStr(ServerInstance->Config->ports[i])+" (" + ConvToStr(pc[ServerInstance->Config->ports[i]])+" client" +
- (pc[ServerInstance->Config->ports[i]] != 1 ? "s" : "") + ")");
+ (pc[ServerInstance->Config->ports[i]] != 1 ? "s" : "") + "), "+ServerInstance->Config->openSockfd[i]->GetDescription());
}
}
break;
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 1e6208b66..e5c316035 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -140,6 +140,9 @@ class ModuleSSLGnuTLS : public Module
if (ServerInstance->Config->AddIOHook(portno, this))
{
listenports.push_back(portno);
+ for (unsigned int i = 0; i < ServerInstance->stats->BoundPortCount; i++)
+ if (ServerInstance->Config->ports[i])
+ ServerInstance->Config->openSockfd[i]->SetDescription("ssl");
ServerInstance->Log(DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %d", portno);
}
else
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index bc137238a..c5b6d1c62 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -164,6 +164,9 @@ class ModuleSSLOpenSSL : public Module
if (ServerInstance->Config->AddIOHook(portno, this))
{
listenports.push_back(portno);
+ for (unsigned int i = 0; i < ServerInstance->stats->BoundPortCount; i++)
+ if (ServerInstance->Config->ports[i])
+ ServerInstance->Config->openSockfd[i]->SetDescription("ssl");
ServerInstance->Log(DEFAULT, "m_ssl_openssl.so: Enabling SSL for port %d", portno);
}
else
diff --git a/src/socket.cpp b/src/socket.cpp
index ee21400d3..9345af224 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -36,7 +36,7 @@ const char inverted_bits[8] = { 0x00, /* 00000000 - 0 bits - never actually used
};
-ListenSocket::ListenSocket(InspIRCd* Instance, int sockfd, insp_sockaddr client, insp_sockaddr server, int port, char* addr) : ServerInstance(Instance)
+ListenSocket::ListenSocket(InspIRCd* Instance, int sockfd, insp_sockaddr client, insp_sockaddr server, int port, char* addr) : ServerInstance(Instance), desc("plaintext")
{
this->SetFd(sockfd);
Instance->Log(DEBUG,"Binding to port %s:%d",addr,port);