Dr4kiel / DChat

Un logiciel console de tchat (Serveur / Client)
MIT License
0 stars 1 forks source link

Feature Request - Allow domain names and 'localhost' as address in /join <ipaddress> command #3

Open Em-ilien opened 3 months ago

Em-ilien commented 3 months ago

Currently the /join command can only take an IPv4 address as an ipaddress argument. Is it possible to allow 'localhost' and domain names as addresses?

In the ClientManager.cpp file it would be necessary to change the regex which extracts the IP address in the lines:

std::regex ipRegex("([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)");
std::smatch match;
std::regex_search(dataStr, match, ipRegex);
ip_ = match.str();

Thanks you,

Dr4kiel commented 3 months ago

Thanks a lot for your report ! I will work on it as fast as i can :)