aboutsummaryrefslogtreecommitdiffstats
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2018-01-20 00:32:31 +0000
committerGravatar Peter Powell2018-01-20 11:28:47 +0000
commitbe12938393585ba0994a1aeaafcb6fd879580506 (patch)
treeb65dc67fe984ddb0e256f3f28ec582934a61ca69 /src/users.cpp
parentFix some minor Doxygen errors. (diff)
downloadinspircd++-be12938393585ba0994a1aeaafcb6fd879580506.tar.gz
inspircd++-be12938393585ba0994a1aeaafcb6fd879580506.tar.bz2
inspircd++-be12938393585ba0994a1aeaafcb6fd879580506.zip
Remove duplicated code in LocalUser::GetServerPort().
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 41caa5c5a..5ddd98def 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -648,14 +648,7 @@ void LocalUser::OverruleNick()
int LocalUser::GetServerPort()
{
- switch (this->server_sa.sa.sa_family)
- {
- case AF_INET6:
- return htons(this->server_sa.in6.sin6_port);
- case AF_INET:
- return htons(this->server_sa.in4.sin_port);
- }
- return 0;
+ return this->server_sa.port();
}
const std::string& User::GetIPString()