Quote:
Originally Posted by komashchenko
can you give an example of what you would like to see?
|
something like this i guess:
Code:
public void OnPluginStart()
{
// uses the system's dns resolver
PTaH_GetHostByName("google.com", OnDNSLookup_Success, OnDNSLookup_Failure);
// custom dns resolver
PTaH_GetHostByName_Custom("google.com", OnDNSLookup_Success, OnDNSLookup_Failure, "8.8.4.4");
}
public void OnDNSLookup_Success(int ipaddress[4])
{
PrintToServer("IP: %d.%d.%d.%d", ipaddress >>> 24 & 255, ipaddress >>> 16 & 255, ipaddress >>> 8 & 255, ipaddress & 255);
}
public void OnDNSLookup_Failure(const char[] reason)
{
PrintToServer("Lookup failed! Reason: %s", reason);
}
__________________