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:
2012-10-27 07:44:26 +00:00
parent 53b4175d00
commit 099dd55d0c
54 changed files with 2691 additions and 1266 deletions

View File

@@ -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
*/