Commit f0a3bb95 authored by nanahira's avatar nanahira

single ipv4 no srv lookup

parent 5233cd4e
...@@ -4149,6 +4149,12 @@ bool DuelClient::LookupSRV(char *hostname, HostResult* result) { ...@@ -4149,6 +4149,12 @@ bool DuelClient::LookupSRV(char *hostname, HostResult* result) {
HostResult DuelClient::ParseHost(char *hostname) { HostResult DuelClient::ParseHost(char *hostname) {
HostResult result; HostResult result;
unsigned int tryAddress = htonl(inet_addr(hostname));
if(tryAddress != -1) {
result.host = tryAddress;
result.port = 7911;
return result;
}
auto trySplitter = strchr(hostname, ':'); auto trySplitter = strchr(hostname, ':');
if(trySplitter == NULL) { if(trySplitter == NULL) {
char srvHostname[114]; char srvHostname[114];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment