]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/lists.h
New function IRC_KillClient() to kill clients
[ngircd-alex.git] / src / ngircd / lists.h
index 366f075eb377323a18e7e66af410923e84a7b59f..db0f11a9603691f9eb64f5fcf90b638c007a0876 100644 (file)
@@ -1,36 +1,54 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2012 Alexander Barton (alex@barton.de) and Contributors.
  *
- * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
- * der GNU General Public License (GPL), wie von der Free Software Foundation
- * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
- * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
- * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
- * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
- *
- * $Id: lists.h,v 1.3 2002/06/09 13:18:40 alex Exp $
- *
- * lists.h: Verwaltung der "IRC-Listen": Ban, Invite, ... (Header)
+ * 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.
  */
 
-
 #ifndef __lists_h__
 #define __lists_h__
 
+/**
+ * @file
+ * Management of IRC lists (header)
+ */
 
-GLOBAL VOID Lists_Init PARAMS(( VOID ));
-GLOBAL VOID Lists_Exit PARAMS(( VOID ));
+#include "portab.h"
+#include "client.h"
 
-GLOBAL BOOLEAN Lists_CheckInvited PARAMS(( CLIENT *Client, CHANNEL *Chan ));
-GLOBAL VOID Lists_AddInvited PARAMS(( CHAR *Pattern, CHANNEL *Chan, BOOLEAN OnlyOnce ));
+struct list_elem;
 
-GLOBAL BOOLEAN Lists_CheckBanned PARAMS(( CLIENT *Client, CHANNEL *Chan ));
+struct list_head {
+       struct list_elem *first;
+};
 
-GLOBAL VOID Lists_DeleteChannel PARAMS(( CHANNEL *Chan ));
+GLOBAL struct list_elem *Lists_GetFirst PARAMS((const struct list_head *));
+GLOBAL struct list_elem *Lists_GetNext PARAMS((const struct list_elem *));
 
+GLOBAL bool Lists_Check PARAMS((struct list_head *head, CLIENT *client));
+GLOBAL bool Lists_CheckReason PARAMS((struct list_head *head, CLIENT *client,
+                                     char *reason, size_t len));
+GLOBAL struct list_elem *Lists_CheckDupeMask PARAMS((const struct list_head *head,
+                                       const char *mask));
 
-#endif
+GLOBAL bool Lists_Add PARAMS((struct list_head *h, const char *Mask,
+                             time_t ValidUntil, const char *Reason));
+GLOBAL void Lists_Del PARAMS((struct list_head *head, const char *Mask));
+GLOBAL unsigned long Lists_Count PARAMS((struct list_head *h));
 
+GLOBAL void Lists_Free PARAMS((struct list_head *head));
+
+GLOBAL void Lists_MakeMask PARAMS((const char *Pattern, char *mask, size_t len));
+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));
+
+GLOBAL void Lists_Expire PARAMS((struct list_head *h, const char *ListName));
+
+#endif
 
 /* -eof- */