06.09.2014, 21:15
try this....Credits aren't mine tho.
pawn Code:
stock detectIP(text[])
{
new dotCount;
for(new i; i < strlen(text); ++i)
{
if('0' <= text[i] <= '9')
{
do
{
if(text[i] == '.') ++dotCount;
++i;
}
while(('0' <= text[i] <= '9') || text[i] == '.' || text[i] == ':');
}
}
if(dotCount >= 3) return true;
return false;
}