Split IP
#2

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?
pawn Код:
sscanf(IP, "p<.>s[4]s[4]s[4]s[4]", IP[0], IP[1], IP[2], IP[3]);
2. The string size for one part of the IP needs to be 4, not 3 due to the null character in the end.
pawn Код:
new cip[4][4];
3. Use a ban system implementation similar to the one of Slice's here. It makes scanning for range bans much more simple!
Reply


Messages In This Thread
Split IP - by Mr.Momo - 24.11.2011, 17:10
Re: Split IP - by AndreT - 24.11.2011, 17:17
Re : Split IP - by Mr.Momo - 24.11.2011, 17:38
Re: Re : Split IP - by Steven82 - 24.11.2011, 17:40

Forum Jump:


Users browsing this thread: 1 Guest(s)