I don't think SourceMod has the ability to do this built in.
Probably needs an extension to do it. Not sure how hard that would be to write, but it should just need to wrap the various OS's inet_pton and gethostbyname/getnameinfo calls.
__________________
Not currently working on SourceMod plugin development.
I don't think SourceMod has the ability to do this built in.
Probably needs an extension to do it. Not sure how hard that would be to write, but it should just need to wrap the various OS's inet_pton and gethostbyname/getnameinfo calls.
I scrapped an extension (I've never coded extensions but I am quite familiar with c++). It only works on linux afaik. Any recomendations?
/**
* Resolves a FQDN into an IP address, to its binary form.
*
* @param s_fqdn The FQDN to query.
* @return IP address in binary form.
*/
native int FQDN_to_IP(char s_fqdn[255])