]>
jfr.im git - irc/quakenet/newserv.git/blob - helpmod2/huser.h
1 /* new H user, a little more than N's user */
7 #include "../lib/sstring.h"
8 #include "../nick/nick.h"
9 #include "../channel/channel.h"
14 #include "helpmod_entries.h"
16 #define H_USRFLAGS_DEFAULT 0
18 typedef struct huser_struct
20 /* the real N user, channel information etc. can be gotten from this */
25 helpmod_entry state
; /* for old H */
29 /* for the lamer control, global -> can detect lame amsg's */
31 int last_line_repeats
;
37 /* end lamer control */
39 struct huser_channel_struct
*hchannels
;
41 struct huser_struct
*next
;
47 HCUMODE_VOICE
= 1 << 1,
49 H_IDLE_WARNING
= 1 << 3
52 typedef struct huser_channel_struct
55 struct hchannel_struct
*hchan
;
58 /* for queue, tells us who was the oper for this user */
59 huser
*responsible_oper
;
61 struct huser_channel_struct
*next
;
67 huser
*huser_add(nick
*);
68 void huser_del(huser
*);
70 huser
*huser_get(nick
*);
72 /* indicates that the user did something, channel is optional */
73 void huser_activity(huser
*, hchannel
*);
75 void huser_clear_inactives(void);
76 int huser_count(void);
77 void huser_reset_states(void);
79 hlevel
huser_get_level(huser
*);
80 int huser_get_account_flags(huser
*);
82 /* defines the "being on queue" and being on desk (getting service) */
83 int on_queue(huser
*, huser_channel
*);
84 int on_desk(huser
*, huser_channel
*);
87 int huser_is_trojan(huser
*);
89 huser_channel
*huser_add_channel(huser
*, struct hchannel_struct
*);
90 void huser_del_channel(huser
*, struct hchannel_struct
*);
91 /* returns 0 if the user is not on the channel, non-zero otherwise */
92 huser_channel
*huser_on_channel(huser
*, struct hchannel_struct
*);
94 /* returns non-zero if the given huser pointer is valid */
95 int huser_valid(huser
*);