aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/lists.h
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-07 21:31:49 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-07 21:31:49 +0100
commit79b59f9b30fb6a1fdf8c3efb446271f7cb00d434 (patch)
treef6ade4ccbc3af20d825edacfd12b5da8ded8d240 /FICS/lists.h
FICS 1.6.2
Diffstat (limited to 'FICS/lists.h')
-rw-r--r--FICS/lists.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/FICS/lists.h b/FICS/lists.h
new file mode 100644
index 0000000..8b34a69
--- /dev/null
+++ b/FICS/lists.h
@@ -0,0 +1,44 @@
+/* lists.h */
+
+#include <stdio.h>
+
+#ifndef _LISTS_H
+#define _LISTS_H
+
+/* yes, it's all cheesy.. there is no significance to the order, but make
+ sure it matches the order in lists.c */
+
+enum ListWhich {L_ADMIN = 0, L_REMOVEDCOM, L_FILTER, L_BAN, L_ABUSER,
+L_MUZZLE, L_CMUZZLE, L_FM, L_IM, L_GM, L_BLIND, L_TEAMS, L_COMPUTER,
+L_TD, L_CENSOR, L_GNOTIFY, L_NOPLAY, L_NOTIFY, L_CHANNEL};
+
+enum ListPerm {P_HEAD = 0, P_GOD, P_ADMIN, P_PUBLIC, P_PERSONAL};
+
+typedef struct {enum ListPerm rights; char *name;} ListTable;
+
+/* max. names in one list: 200 */
+#define MAX_GLOBAL_LIST_SIZE 200
+
+typedef struct _List List;
+struct _List {
+ enum ListWhich which;
+ int numMembers;
+ char *member[MAX_GLOBAL_LIST_SIZE];
+ struct _List *next;
+};
+
+extern int com_addlist();
+extern int com_sublist();
+extern int com_showlist();
+
+extern void list_free(List *);
+extern int in_list(int, enum ListWhich, char *);
+extern int list_size(int p, enum ListWhich);
+extern int list_add(int, enum ListWhich, char *);
+extern int list_addsub (int,char*,char*,int);
+extern int list_sub(int, enum ListWhich, char *);
+extern void list_print(FILE *, int, enum ListWhich);
+extern int titled_player(int, char *);
+extern int list_channels(int,int);
+
+#endif /* _LISTS_H */