- The big forward port. I probably broke lots of stuff, so please look over any
[ircu2.10.12-pk.git] / include / s_user.h
index e3e70c7846d87d0e0e1839b4ed249674e0904077..587b599d5e1933be89daea882dcd84e237835f02 100644 (file)
@@ -12,8 +12,9 @@
 
 struct Client;
 struct User;
-struct Gline;
 struct Channel;
+struct MsgBuf;
+struct Flags;
 
 /*
  * Macros
@@ -40,6 +41,11 @@ struct Channel;
 #define HUNTED_ISME     0       /* if this server should execute the command */
 #define HUNTED_PASS     1       /* if message passed onwards successfully */
 
+/* send sets for send_umode() */
+#define ALL_UMODES 0  /* both local and global user modes */
+#define SEND_UMODES 1  /* global user modes only */
+#define SEND_UMODES_BUT_OPER 2  /* global user modes except for FLAG_OPER */
+
 /* used when sending to #mask or $mask */
 
 #define MATCH_SERVER  1
@@ -49,7 +55,7 @@ struct Channel;
 
 extern struct SLink *opsarray[];
 
-typedef char* (*InfoFormatter)(struct Client* who, char* buf);
+typedef void (*InfoFormatter)(struct Client* who, struct Client *sptr, struct MsgBuf* buf);
 
 /*
  * Prototypes
@@ -57,22 +63,21 @@ typedef char* (*InfoFormatter)(struct Client* who, char* buf);
 extern struct User* make_user(struct Client *cptr);
 extern void         free_user(struct User *user);
 extern int          register_user(struct Client* cptr, struct Client* sptr,
-                                  const char* nick, char* username,
-                                 struct Gline *agline);
+                                  const char* nick, char* username);
 
 extern void         user_count_memory(size_t* count_out, size_t* bytes_out);
 
-extern int user_set_away(struct User* user, char* message);
-extern int do_nick_name(char* nick);
 extern int set_nick_name(struct Client* cptr, struct Client* sptr,
                          const char* nick, int parc, char* parv[]);
-extern void send_umode_out(struct Client* cptr, struct Client* sptr, int old);
+extern void send_umode_out(struct Client* cptr, struct Client* sptr,
+                          struct Flags* old, int prop);
 extern int whisper(struct Client* source, const char* nick,
                    const char* channel, const char* text, int is_notice);
 extern void send_user_info(struct Client* to, char* names, int rpl,
                            InfoFormatter fmt);
 extern int add_silence(struct Client* sptr, const char* mask);
 
+extern int hide_hostmask(struct Client *cptr, unsigned int flags);
 extern int set_user_mode(struct Client *cptr, struct Client *sptr,
                          int parc, char *parv[]);
 extern int is_silenced(struct Client *sptr, struct Client *acptr);
@@ -82,9 +87,14 @@ extern int hunt_server_cmd(struct Client *from, const char *cmd,
                           const char *tok, struct Client *one,
                           int MustBeOper, const char *pattern, int server,
                           int parc, char *parv[]);
+extern int hunt_server_prio_cmd(struct Client *from, const char *cmd,
+                               const char *tok, struct Client *one,
+                               int MustBeOper, const char *pattern,
+                               int server, int parc, char *parv[]);
 extern struct Client* next_client(struct Client* next, const char* ch);
 extern char *umode_str(struct Client *cptr);
-extern void send_umode(struct Client *cptr, struct Client *sptr, int old, int sendmask);
+extern void send_umode(struct Client *cptr, struct Client *sptr,
+                       struct Flags *old, int sendset);
 extern int del_silence(struct Client *sptr, char *mask);
 extern void set_snomask(struct Client *, unsigned int, int);
 extern int is_snomask(char *);
@@ -93,9 +103,11 @@ extern int check_target_limit(struct Client *sptr, void *target, const char *nam
 extern void add_target(struct Client *sptr, void *target);
 extern unsigned int umode_make_snomask(unsigned int oldmask, char *arg,
                                        int what);
+extern int send_supported(struct Client *cptr);
 
 #define NAMES_ALL 1 /* List all users in channel */
 #define NAMES_VIS 2 /* List only visible users in non-secret channels */
+#define NAMES_EON 4 /* Add an 'End Of Names' reply to the end */
 
 void do_names(struct Client* sptr, struct Channel* chptr, int filter);