diff options
author | Peter Powell <petpow@saberuk.com> | 2018-01-20 00:32:31 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-01-20 11:28:47 +0000 |
commit | be12938393585ba0994a1aeaafcb6fd879580506 (patch) | |
tree | b65dc67fe984ddb0e256f3f28ec582934a61ca69 | |
parent | 51206352a965aced6913957f80421ade6ebe1eb3 (diff) |
Remove duplicated code in LocalUser::GetServerPort().
-rw-r--r-- | src/users.cpp | 9 |
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() |