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 refnum; 17 int dirty; 18 int piggyback; 19 int undernet_extended; 20 char *undernet_extended_args; 21 int dalnet_extended; 22 char *dalnet_extended_args; 23 int who_mask; 24 char *who_target; 25 char *who_name; 26 char *who_host; 27 char *who_server; 28 char *who_nick; 29 char *who_real; 30 char *who_stuff; 31 char *who_end; 32 struct WhoEntryT *next; 33 void (*line) (int, const char *, const char *, const char **); 34 void (*end) (int, const char *, const char *, const char **); 35 36 Timeval request_time; 37 Timeval dirty_time; 38 } WhoEntry; 39 40 BUILT_IN_COMMAND(whocmd); 41 void whobase (int, char *, 42 void (*)(int, const char *, const char *, const char **), 43 void (*)(int, const char *, const char *, const char **)); 44 void whoreply (int, const char *, const char *, const char **); 45 void xwhoreply (int, const char *, const char *, const char **); 46 void who_end (int, const char *, const char *, const char **); 47 int fake_who_end (int, const char *, const char *, const char *); 48 49 50 51 /* ISON queue */ 52 53 typedef struct IsonEntryT 54 { 55 char *ison_asked; 56 char *ison_got; 57 struct IsonEntryT *next; 58 void (*line) (int, char *, char *); 59 char *oncmd; 60 char *offcmd; 61 char *endcmd; 62 } IsonEntry; 63 64 BUILT_IN_COMMAND(isoncmd); 65 void isonbase (int refnum, char *args, void (*line) (int, char *, char *)); 66 void ison_returned (int, const char *, const char *, const char **); 67 68 69 70 /* USERHOST queue */ 71 typedef struct UserhostItemT 72 { 73 char * nick; 74 int oper; 75 int connected; 76 int away; 77 const char * user; 78 const char * host; 79 const char * extra; 80 } UserhostItem; 81 82 typedef struct UserhostEntryT 83 { 84 const char * format; 85 char * userhost_asked; 86 char * text; 87 char * extra; 88 struct UserhostEntryT * next; 89 void (*func) (int, UserhostItem *, const char *, const char *); 90 } UserhostEntry; 91 92 BUILT_IN_COMMAND(userhostcmd); 93 BUILT_IN_COMMAND(useripcmd); 94 BUILT_IN_COMMAND(usripcmd); 95 void userhostbase (int refnum, char *arg, const char *subargs, 96 void (*line) (int, UserhostItem *, 97 const char *, const char *), int); 98 void userhost_returned (int, const char *, const char *, const char **); 99 void userhost_cmd_returned (int, UserhostItem *, const char *, const char *); 100 101 #endif 102