29.09.2011, 23:22
how can i replace the ip with *'s?
im use Ryder`s code
if someone advertise i want it ro return like this:
somename: Everyone come to my server!! the ip is ***.***.*.*:****
im use Ryder`s code
pawn Code:
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);
}
somename: Everyone come to my server!! the ip is ***.***.*.*:****