1 /*
2  * who.h -- header info for the WHO, ISON, and USERHOST queues.
3  * Copyright 1996 EPIC Software Labs
4  */
5 
6 #ifndef __who_h__
7 #define __who_h__
8 
9 void clean_server_queues (int);
10 
11 /* WHO queue */
12 
13 /* XXX This should be in who.c */
14 typedef struct WhoEntryT
15 {
16 	int  dirty;
17 	int  piggyback;
18 	int  undernet_extended;
19 	char *undernet_extended_args;
20 	int  dalnet_extended;
21 	char *dalnet_extended_args;
22         int  who_mask;
23 	char *who_target;
24         char *who_name;
25         char *who_host;
26         char *who_server;
27         char *who_nick;
28         char *who_real;
29 	char *who_stuff;
30 	char *who_end;
31         struct WhoEntryT *next;
32 	void (*line) (int, const char *, const char *, const char **);
33 	void (*end) (int, const char *, const char *, const char **);
34 
35 } WhoEntry;
36 
37 	BUILT_IN_COMMAND(whocmd);
38 	void 	whobase (int, char *,
39 		   void (*)(int, const char *, const char *, const char **),
40 		   void (*)(int, const char *, const char *, const char **));
41 	void 	whoreply (int, const char *, const char *, const char **);
42 	void 	xwhoreply (int, const char *, const char *, const char **);
43 	void 	who_end (int, const char *, const char *, const char **);
44 	int 	fake_who_end (int, const char *, const char *, const char *);
45 
46 
47 
48 /* ISON queue */
49 
50 typedef struct IsonEntryT
51 {
52 	char *ison_asked;
53 	char *ison_got;
54 	struct IsonEntryT *next;
55 	void (*line) (int, char *, char *);
56 } IsonEntry;
57 
58 	BUILT_IN_COMMAND(isoncmd);
59 	void 	isonbase 	(int refnum, char *args, void (*line) (int, char *, char *));
60 	void 	ison_returned 	(int, const char *, const char *, const char **);
61 
62 
63 
64 /* USERHOST queue */
65 
66 typedef struct UserhostItemT
67 {
68 	char *	nick;
69 	int   	oper;
70 	int	connected;
71 	int   	away;
72 	const char *	user;
73 	const char *	host;
74 } UserhostItem;
75 
76 typedef struct UserhostEntryT
77 {
78 	char *		userhost_asked;
79 	char *		text;
80 	struct UserhostEntryT *	next;
81 	void 		(*func) (int, UserhostItem *, const char *, const char *);
82 } UserhostEntry;
83 
84 	BUILT_IN_COMMAND(userhostcmd);
85 	BUILT_IN_COMMAND(useripcmd);
86 	BUILT_IN_COMMAND(usripcmd);
87 	void 	userhostbase 		(int refnum, char *arg,
88 					void (*line) (int, UserhostItem *,
89 						const char *, const char *), int);
90 	void 	userhost_returned 	(int, const char *, const char *, const char **);
91 	void 	userhost_cmd_returned 	(int, UserhostItem *, const char *, const char *);
92 
93 #endif
94