File: who.h

package info (click to toggle)
epic5 3.0.3-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 5,328 kB
  • sloc: ansic: 75,810; makefile: 648; ruby: 227; python: 215; sh: 78; perl: 13
file content (101 lines) | stat: -rw-r--r-- 2,547 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
 * who.h -- header info for the WHO, ISON, and USERHOST queues.
 * Copyright 1996 EPIC Software Labs
 */

#ifndef __who_h__
#define __who_h__

void clean_server_queues (int);

/* WHO queue */

/* XXX This should be in who.c */
typedef struct WhoEntryT
{
	int  refnum;
	int  dirty;
	int  piggyback;
	int  undernet_extended;
	char *undernet_extended_args;
	int  dalnet_extended;
	char *dalnet_extended_args;
        int  who_mask;
	char *who_target;
        char *who_name;
        char *who_host;
        char *who_server;
        char *who_nick;
        char *who_real;
	char *who_stuff;
	char *who_end;
        struct WhoEntryT *next;
	void (*line) (int, const char *, const char *, const char **);
	void (*end) (int, const char *, const char *, const char **);

	Timeval	request_time;
	Timeval	dirty_time;
} WhoEntry;

	BUILT_IN_COMMAND(whocmd);
	void 	whobase (int, char *, 
		   void (*)(int, const char *, const char *, const char **), 
		   void (*)(int, const char *, const char *, const char **));
	void 	whoreply (int, const char *, const char *, const char **);
	void 	xwhoreply (int, const char *, const char *, const char **);
	void 	who_end (int, const char *, const char *, const char **);
	int 	fake_who_end (int, const char *, const char *, const char *);



/* ISON queue */

typedef struct IsonEntryT
{
	char *ison_asked;
	char *ison_got;
	struct IsonEntryT *next;
	void (*line) (int, char *, char *);
	char *oncmd;
	char *offcmd;
	char *endcmd;
} IsonEntry;

	BUILT_IN_COMMAND(isoncmd);
	void 	isonbase 	(int refnum, char *args, void (*line) (int, char *, char *));
	void 	ison_returned 	(int, const char *, const char *, const char **);



/* USERHOST queue */
typedef struct UserhostItemT
{
	char *	nick;
	int   	oper;
	int	connected;
	int   	away;
	const char *	user;
	const char *	host;
	const char *	extra;
} UserhostItem;

typedef struct UserhostEntryT
{
        const char *    format;
        char *          userhost_asked;
        char *          text;
	char *		extra;
        struct UserhostEntryT * next;
        void            (*func) (int, UserhostItem *, const char *, const char *); 
} UserhostEntry;

	BUILT_IN_COMMAND(userhostcmd);
	BUILT_IN_COMMAND(useripcmd);
	BUILT_IN_COMMAND(usripcmd);
	void 	userhostbase 		(int refnum, char *arg, const char *subargs,
					void (*line) (int, UserhostItem *, 
						const char *, const char *), int);
	void 	userhost_returned 	(int, const char *, const char *, const char **);
	void 	userhost_cmd_returned 	(int, UserhostItem *, const char *, const char *);

#endif