X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=include%2Fs_user.h;h=63ed134d2c52bf193e39799344a673533a2a29f3;hb=refs%2Fheads%2Fupstream-ssl;hp=350e3459aa961e0ff83bdc5320395c0311fc1f9b;hpb=e64ea905429daae46c60601a015d8d9f2ea4a268;p=ircu2.10.12-pk.git diff --git a/include/s_user.h b/include/s_user.h index 350e345..63ed134 100644 --- a/include/s_user.h +++ b/include/s_user.h @@ -1,7 +1,6 @@ -/* - * s_user.h - * - * $Id$ +/** @file s_user.h + * @brief Miscellaneous user-related helper functions. + * @version $Id$ */ #ifndef INCLUDED_s_user_h #define INCLUDED_s_user_h @@ -51,9 +50,9 @@ struct Flags; #define MATCH_SERVER 1 /**< flag for relay_masked_message (etc) to indicate the mask matches a server name */ #define MATCH_HOST 2 /**< flag for relay_masked_message (etc) to indicate the mask matches host name */ -#define COOKIE_VERIFIED 0xffffffff /**< value for cli_cookie() to show completion */ - -extern struct SLink *opsarray[]; /**< element N is a list of local opers with bit N set in their server notice mask (cli_snomask()) */ +/* used for parsing user modes */ +#define ALLOWMODES_ANY 0 /**< Allow any user mode */ +#define ALLOWMODES_DEFAULT 1 /**< Only allow the subset of modes that are legit defaults */ /** Formatter function for send_user_info(). * @param who Client being displayed. @@ -67,8 +66,7 @@ typedef void (*InfoFormatter)(struct Client* who, struct Client *sptr, struct Ms */ 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); +extern int register_user(struct Client* cptr, struct Client *sptr); extern void user_count_memory(size_t* count_out, size_t* bytes_out); @@ -80,14 +78,11 @@ 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[]); + int parc, char *parv[], int allow_modes); extern int is_silenced(struct Client *sptr, struct Client *acptr); -extern int hunt_server(int, struct Client *cptr, struct Client *sptr, - char *command, int server, int parc, char *parv[]); extern int hunt_server_cmd(struct Client *from, const char *cmd, const char *tok, struct Client *one, int MustBeOper, const char *pattern, int server, @@ -100,7 +95,6 @@ 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, 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 *); extern int check_target_limit(struct Client *sptr, void *target, const char *name,