24.11.2011, 17:17
I really don't want to go over the split function. It takes time for me to properly understand how it works and so on, but I have some suggestions for you:
1. Why not use sscanf to split up your IPs?
2. The string size for one part of the IP needs to be 4, not 3 due to the null character in the end.
3. Use a ban system implementation similar to the one of Slice's here. It makes scanning for range bans much more simple!
1. Why not use sscanf to split up your IPs?
pawn Код:
sscanf(IP, "p<.>s[4]s[4]s[4]s[4]", IP[0], IP[1], IP[2], IP[3]);
pawn Код:
new cip[4][4];