17.02.2012, 15:17
Hey guys, I wanted to ask you how do you call the function RDNS in the callback onplayerconnect!
The script is this:
public OnReverseDNS (ip [], host [] extra){
new strDNS[256];
printf("OnReverseDNS(% s,% s,% d)",ip,host,extra);
format(strDNS,sizeof(strDNS),"DNS: %s || IP: %s",host,ip);
for (new i = 0; i <MAX_SERVER_PLAYERS; i++){
if (IsPlayerConnected (i)){
if (PlayerInfo [i] [lAdmin]> = 1 | | IsPlayerAdmin (i)){
SendClientMessage (i, White, "NEW JOIN FROM:");
SendClientMessage (i, Grey, strDNS);}}}
return 1;
}
The script is this:
public OnReverseDNS (ip [], host [] extra){
new strDNS[256];
printf("OnReverseDNS(% s,% s,% d)",ip,host,extra);
format(strDNS,sizeof(strDNS),"DNS: %s || IP: %s",host,ip);
for (new i = 0; i <MAX_SERVER_PLAYERS; i++){
if (IsPlayerConnected (i)){
if (PlayerInfo [i] [lAdmin]> = 1 | | IsPlayerAdmin (i)){
SendClientMessage (i, White, "NEW JOIN FROM:");
SendClientMessage (i, Grey, strDNS);}}}
return 1;
}