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

@@ -12,6 +12,7 @@
#include <ctime>
#include "core/textstream.h"
#include "textstream/textstream.h"
@@ -103,6 +104,10 @@ public:
TexTextStream & operator<<(RawText<double> raw);
TexTextStream & operator<<(RawText<void*> raw);
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
TexTextStream & operator<<(RawText<PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw);
// 'write' don't escapes too
// with these methods you can write a zero character too
TexTextStream & Write(const char * buf, size_t len);
@@ -146,6 +151,9 @@ public:
TexTextStream & operator<<(const PT::Space & space);
TexTextStream & operator<<(const PT::Date & Date);
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
TexTextStream & operator<<(const PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg);
private:
TextStream<std::wstring> tmp_stream;
@@ -153,6 +161,26 @@ private:
};
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
TexTextStream & TexTextStream::operator<<(RawText<PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw)
{
TextStream<std::wstring>::operator<<(raw.par);
return *this;
}
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
TexTextStream & TexTextStream::operator<<(const PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg)
{
typename PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size>::const_iterator i;
for(i=arg.begin() ; i != arg.end() ; ++i)
ETextPutChar(*i);
return *this;
}
#endif