2002-05-27 13:22:39 +02:00
|
|
|
/*
|
|
|
|
* ngIRCd -- The Next Generation IRC Daemon
|
2012-01-15 19:46:00 +01:00
|
|
|
* Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
|
2002-05-27 13:22:39 +02:00
|
|
|
*
|
2002-12-12 13:23:43 +01:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
* Please read the file COPYING, README and AUTHORS for more information.
|
2002-05-27 13:22:39 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __lists_h__
|
|
|
|
#define __lists_h__
|
2010-12-27 17:14:14 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Management of IRC lists (header)
|
|
|
|
*/
|
|
|
|
|
2006-12-07 18:57:20 +01:00
|
|
|
#include "portab.h"
|
|
|
|
#include "client.h"
|
2002-05-27 13:22:39 +02:00
|
|
|
|
2006-12-07 18:57:20 +01:00
|
|
|
struct list_elem;
|
2002-05-27 13:22:39 +02:00
|
|
|
|
2006-12-07 18:57:20 +01:00
|
|
|
struct list_head {
|
|
|
|
struct list_elem *first;
|
|
|
|
};
|
2002-05-27 13:22:39 +02:00
|
|
|
|
2006-12-07 18:57:20 +01:00
|
|
|
GLOBAL struct list_elem *Lists_GetFirst PARAMS((const struct list_head *));
|
|
|
|
GLOBAL struct list_elem *Lists_GetNext PARAMS((const struct list_elem *));
|
2002-05-27 13:22:39 +02:00
|
|
|
|
2011-12-25 14:48:13 +01:00
|
|
|
GLOBAL bool Lists_Check PARAMS((struct list_head *head, CLIENT *client));
|
2013-04-20 00:51:42 +02:00
|
|
|
GLOBAL bool Lists_CheckReason PARAMS((struct list_head *head, CLIENT *client,
|
|
|
|
char *reason, size_t len));
|
2011-12-25 19:42:03 +01:00
|
|
|
GLOBAL struct list_elem *Lists_CheckDupeMask PARAMS((const struct list_head *head,
|
2011-12-25 14:48:13 +01:00
|
|
|
const char *mask));
|
2002-06-09 15:18:40 +02:00
|
|
|
|
2011-12-25 14:48:13 +01:00
|
|
|
GLOBAL bool Lists_Add PARAMS((struct list_head *h, const char *Mask,
|
2015-05-13 22:08:26 +02:00
|
|
|
time_t ValidUntil, const char *Reason,
|
|
|
|
bool OnlyOnce));
|
2011-12-25 14:48:13 +01:00
|
|
|
GLOBAL void Lists_Del PARAMS((struct list_head *head, const char *Mask));
|
2012-01-16 00:26:12 +01:00
|
|
|
GLOBAL unsigned long Lists_Count PARAMS((struct list_head *h));
|
2002-09-08 02:56:14 +02:00
|
|
|
|
2011-12-25 14:48:13 +01:00
|
|
|
GLOBAL void Lists_Free PARAMS((struct list_head *head));
|
2002-05-27 13:22:39 +02:00
|
|
|
|
2013-04-20 01:19:03 +02:00
|
|
|
GLOBAL void Lists_MakeMask PARAMS((const char *Pattern, char *mask, size_t len));
|
2011-12-25 14:19:45 +01:00
|
|
|
GLOBAL const char *Lists_GetMask PARAMS((const struct list_elem *e));
|
|
|
|
GLOBAL const char *Lists_GetReason PARAMS((const struct list_elem *e));
|
|
|
|
GLOBAL time_t Lists_GetValidity PARAMS((const struct list_elem *e));
|
2015-05-11 21:50:48 +02:00
|
|
|
GLOBAL bool Lists_GetOnlyOnce PARAMS((const struct list_elem *e));
|
2002-05-27 13:22:39 +02:00
|
|
|
|
2011-12-25 17:44:20 +01:00
|
|
|
GLOBAL void Lists_Expire PARAMS((struct list_head *h, const char *ListName));
|
|
|
|
|
2006-12-07 18:57:20 +01:00
|
|
|
#endif
|
2010-12-27 17:20:46 +01:00
|
|
|
|
2002-05-27 13:22:39 +02:00
|
|
|
/* -eof- */
|