X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fban.h;h=98550a4dca5fc9b0f462f2ba5807a37a742fea6b;hb=b3e60bf49c750f3b710342e32b8d470ec3209383;hp=dbc97d3f3020d9a475bcc1b3db9b310acb8ae8fb;hpb=1f6407aa1a69c734dfeb202a967609c99403f947;p=umurmur.git diff --git a/src/ban.h b/src/ban.h index dbc97d3..98550a4 100644 --- a/src/ban.h +++ b/src/ban.h @@ -1,5 +1,5 @@ -/* Copyright (C) 2009-2011, Martin Johansson - Copyright (C) 2005-2011, Thorvald Natvig +/* Copyright (C) 2009-2014, Martin Johansson + Copyright (C) 2005-2014, Thorvald Natvig All rights reserved. @@ -38,9 +38,12 @@ typedef struct { uint8_t hash[20]; - in_addr_t address; + uint8_t address[16]; + uint32_t mask; char *reason; char *name; + time_t time; + uint32_t duration; etimer_t startTime; struct dlist node; } ban_t; @@ -49,5 +52,11 @@ void Ban_UserBan(client_t *client, char *reason); void Ban_pruneBanned(); bool_t Ban_isBanned(client_t *client); bool_t Ban_isBannedAddr(in_addr_t *addr); +int Ban_getBanCount(void); +message_t *Ban_getBanList(void); +void Ban_putBanList(message_t *msg, int n_bans); +void Ban_clearBanList(void); +void Ban_init(void); +void Ban_deinit(void); #endif