21.05.2009, 19:50
check your inbox @ sa-mp forum
Loading plugin: dns.dll Failed. Script[gamemodes|filterscripts/x.amx]: Run time error 19: "File or function is not found"
Originally Posted by watkijkje
If someone has a Dynamic IP and that IP changes,
does his hostname changes too? |
Originally Posted by Kye
I wanted to make a comment about this.
Reverse DNS is obviously very useful if you need to ban players on a hostmask say: *.their-isp.com. You could check the host off on connect and Kick() them. But: Reverse DNS takes time to resolve and it's the duty of an SA-MP script to return execution to the server as quickly as possible. Calling this function will likely delay execution and result in lag for other players while the reverse DNS lookup is occuring. The only way to do this properly is for the DNS lookup to be threaded and call a callback like OnPlayerReverseDNS(playerid, rdns_string[]). |
Originally Posted by Incognito
I would like to note one final update (hopefully): I have resolved segmentation faults in Linux by executing callbacks from the main thread. The only way I could figure out how to do this was to create a new function, dns_poll_events, which must now be called on a timer somewhere in the script. Look at my updated banhost.pwn for an example.
|
public OnReverseDNS(ip[], host[], extra) { new msg[128]; format(msg, sizeof(msg), "Your hostname is %s.", host); SendClientMessage(extra, COLOR_RED, msg); return 1; }
I wanted to make a comment about this.
Reverse DNS is obviously very useful if you need to ban players on a hostmask say: *.their-isp.com. You could check the host off on connect and Kick() them. But: Reverse DNS takes time to resolve and it's the duty of an SA-MP script to return execution to the server as quickly as possible. Calling this function will likely delay execution and result in lag for other players while the reverse DNS lookup is occuring. The only way to do this properly is for the DNS lookup to be threaded and call a callback like OnPlayerReverseDNS(playerid, rdns_string[]). |