6 #ifndef INCLUDED_s_user_h
7 #define INCLUDED_s_user_h
8 #ifndef INCLUDED_sys_types_h
10 #define INCLUDED_sys_types_h
23 * Minimum time between nick changes.
24 * (The first two changes are allowed quickly after another however).
30 * Minimum time between target changes.
31 * (MAXTARGETS are allowed simultaneously however).
32 * Its set to a power of 2 because we devide through it quite a lot.
34 #define TARGET_DELAY 128
36 /* return values for hunt_server() */
38 #define HUNTED_NOSUCH (-1) /* if the hunted server is not found */
39 #define HUNTED_ISME 0 /* if this server should execute the command */
40 #define HUNTED_PASS 1 /* if message passed onwards successfully */
42 /* used when sending to #mask or $mask */
44 #define MATCH_SERVER 1
47 #define COOKIE_VERIFIED 0xffffffff
49 extern struct SLink *opsarray[];
51 typedef char* (*InfoFormatter)(struct Client* who, char* buf);
56 extern struct User* make_user(struct Client *cptr);
57 extern void free_user(struct User *user);
58 extern int register_user(struct Client* cptr, struct Client* sptr,
59 const char* nick, char* username,
60 struct Gline *agline);
62 extern void user_count_memory(size_t* count_out, size_t* bytes_out);
64 extern int user_set_away(struct User* user, char* message);
65 extern int do_nick_name(char* nick);
66 extern int set_nick_name(struct Client* cptr, struct Client* sptr,
67 const char* nick, int parc, char* parv[]);
68 extern void send_umode_out(struct Client* cptr, struct Client* sptr, int old);
69 extern int whisper(struct Client* source, const char* nick,
70 const char* channel, const char* text, int is_notice);
71 extern void send_user_info(struct Client* to, char* names, int rpl,
73 extern int add_silence(struct Client* sptr, const char* mask);
75 extern int set_user_mode(struct Client *cptr, struct Client *sptr,
76 int parc, char *parv[]);
77 extern int is_silenced(struct Client *sptr, struct Client *acptr);
78 extern int hunt_server(int, struct Client *cptr, struct Client *sptr,
79 char *command, int server, int parc, char *parv[]);
80 extern int hunt_server_cmd(struct Client *from, const char *cmd,
81 const char *tok, struct Client *one,
82 int MustBeOper, const char *pattern, int server,
83 int parc, char *parv[]);
84 extern struct Client* next_client(struct Client* next, const char* ch);
85 extern char *umode_str(struct Client *cptr);
86 extern void send_umode(struct Client *cptr, struct Client *sptr, int old, int sendmask);
87 extern int del_silence(struct Client *sptr, char *mask);
88 extern void set_snomask(struct Client *, unsigned int, int);
89 extern int is_snomask(char *);
90 extern int check_target_limit(struct Client *sptr, void *target, const char *name,
92 extern void add_target(struct Client *sptr, void *target);
93 extern unsigned int umode_make_snomask(unsigned int oldmask, char *arg,
97 #endif /* INCLUDED_s_user_h */