miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
The Other miniBB Support Forums / The Other /  
 

About the banning code

 
Author Ivan
Advanced Member
#1 | Posted: 24 Jun 2007 03:15 
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

Author Ivan
Advanced Member
#2 | Posted: 24 Jun 2007 03:22 
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

The Other miniBB Support Forums / The Other /
 About the banning code
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑