added: IP ban mechanism (not finished yet -- we need a winix function to remove a ban)
now after some incorrent login attempts your IP can be banned or blocked
(see new config variables)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@902 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -526,6 +526,29 @@ return buffer;
|
||||
|
||||
|
||||
|
||||
PT::WTextStream IPToStr(unsigned int ip)
|
||||
{
|
||||
PT::WTextStream buf;
|
||||
|
||||
for(int i=0 ; i<4 ; ++i, ip >>= 8)
|
||||
{
|
||||
buf << (ip & 0xff);
|
||||
|
||||
if( i<3 )
|
||||
buf << '.';
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
PT::WTextStream IPToStr(int ip)
|
||||
{
|
||||
return IPToStr(static_cast<unsigned int>(ip));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
we do not treat a new line character (10) as a white character
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user