[HELP] IP Detecter
#1

hey i need an IP detector if some one try to spam and server IP on chat then change the ip like this **.***.**.****
please tell me the script
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
        if(stringContainsIP(text))
        {
        Kick(playerid);
        }
    return 0;
}
stock stringContainsIP(string[])
{
    new
        dotCount
    ;
    for(new i; string[i] != EOS; ++i)
    {
        if(('0' <= string[i] <= '9') || string[i] == '.' || string[i] == ':')
        {
            if((string[i] == '.') && (string[i + 1] != '.') && ('0' <= string[i - 1] <= '9'))
            {
                ++dotCount;
            }
            continue;
        }
    }
    return (dotCount > 2);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)