miniBB ®®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Other miniBB Community Forum / Other /

About the banning code

 
Ivan
Advanced Member
#1 | Posted: 24 Jun 2007 03:15 | Edited by: Ivan
Reply 
Paul and me recently changed some letters by e-mail. I was interested how exactly banning works, becase the names of the columns in the database was not absolutely clear for me. At the end Paul said: I would prefer if we discuss such questions on forums :-)

So I put here the two last letters, because the matter might be of someone other's interest.

*

Hi Paul :)
 
Thanks for the correction in the code for "All forums moderator". Yes, that was the reason and now all is OK :)
 
> ID in the banned table means system ID which is used for internal
> purposes. You don't need to pay attention to it at all.
>
> "why the IDs are in the place of the IPs" - I don't understand this
> question. They are there because you have entered them :-) When you
> have entered user ID in the banned table, his IP is not taken into
> attention at all. Whatever IP he logs from, he can't do so, because
> his member account is actually blocked, not IP.

Please confirm if I understand right.
 
1. The ID number in the column "id" is a separate, different ID that the script and the database give to the user for their own internal use, and I don't need to think about it.
2. In the column "banip", despite its name, there could be both the real ID or/and the IP of the banned user.
3. When I ban a user, the script recognizes by the structure of the data I enter if it is an IP or ID (may be when it has only one group of numbers and has not a dot after it, or something like that), or simply writes the entered data in the column. When a user tries to log in, it reads his ID and IP, and if exists - stops him.
 
For example:
 
I have ID 155 and I'm banned as user 155. Than I cannot enter with my user name/password, because they are to the user 155. In the same time another user with IP 155.44.1.1 can enter without problems, because for banning him, the entered data must be "155.", "155.44.", "155.44.1." or "155.44.1.1" - i. e. to stop an IP, the script must find in the column 1, 2 or 3 groups of numbers with 1, 2 or 3 dots respectively, or 4 groups of numbers with 3 dots.
 
Right?

All the best from

Ivan
Ivan
Advanced Member
#2 | Posted: 24 Jun 2007 03:22
Reply 
Hola,

> Please confirm if I understand right.

> 1. The ID number in the column "id" is a separate, different ID that the
> script and the database give to the user for their own internal use, and
> I don't need to think about it.

Correct.

> 2. In the column "banip", despite its name, there could be both the real
> ID or/and the IP of the banned user.

There could be ID _OR_ IP of the user. Script compares values in the
following order: full IP, IP masks, then user ID. I.e. if you specify
the number only value script thinks this is ID and compares by ID.

> 3. When I ban a user, the script recognizes by the structure of the data
> I enter if it is an IP or ID (may be when it has only one group of
> numbers and has not a dot after it, or something like that), or simply
> writes the entered data in the column. When a user tries to log in, it
> reads his ID and IP, and if exists - stops him.

> For example:

> I have ID 155 and I'm banned as user 155. Than I cannot enter with my
> user name/password, because they are to the user 155. In the same time
> another user with IP 155.44.1.1 can enter without problems, because for
> banning him, the entered data must be "155.", "155.44.", "155.44.1." or
> "155.44.1.1" - i. e. to stop an IP, the script must find in the column
> 1, 2 or 3 groups of numbers with 1, 2 or 3 dots respectively, or 4 groups of numbers with 3 dots.

> Right?

Exactly.
I would prefer if we discuss such questions on forums :-)

Cheers!
Paul
 
Your Reply
Bold Style  Italic Style  Image Link  URL Link 


» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
Online now: Guests - 36
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®