X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/44a8fbc29e6abb0bf452dded43b3f8b564d11f49..76db5f7dd4bda1d99888c90d0455ebed4fd0b39b:/include/client.h?ds=sidebyside diff --git a/include/client.h b/include/client.h index e1f285a..41ee5af 100644 --- a/include/client.h +++ b/include/client.h @@ -22,7 +22,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: client.h 3446 2007-05-14 22:21:16Z jilles $ */ #ifndef INCLUDED_client_h @@ -84,6 +83,8 @@ struct User char *away; /* pointer to away message */ int refcnt; /* Number of times this block is referenced */ + struct Dictionary *metadata; + char suser[NICKLEN+1]; }; @@ -282,7 +283,7 @@ struct LocalUser struct PrivilegeSet *privset; /* privset... */ - struct rb_event_t *override_timeout_event; + struct ev_entry *override_timeout_event; }; struct PreClient @@ -305,10 +306,8 @@ struct ListClient { unsigned int hash_indice; unsigned int users_min, users_max; - - /* It would be nice to add other modifiers, - * but not for 1.1 --nenolod - */ + time_t created_min, created_max, topic_min, topic_max; + int operspy; }; /* @@ -426,20 +425,13 @@ struct ListClient #define UMODE_NOCTCP 0x0400 /* block CTCPs except for ACTION */ #define UMODE_NOINVITE 0x0800 /* block invites */ #define UMODE_BOT 0x8000 /* mark as a bot in whois */ +#define UMODE_SCALLERID 0x40000 /* soft caller id */ /* user information flags, only settable by remote mode or local oper */ #define UMODE_OPER 0x1000 /* Operator */ #define UMODE_ADMIN 0x2000 /* Admin on server */ #define UMODE_SSLCLIENT 0x4000 /* using SSL */ - -/* oper-controlled privledge umodes. */ -#define UMODE_OVERRIDE 0x20000 - -/* umode/oper mode macros */ -#define IsOper(x) ((x)->umodes & UMODE_OPER) -#define IsAdmin(x) ((x)->umodes & UMODE_ADMIN) -#define IsHelper(x) ((x)->umodes & UMODE_HELPER) -#define IsAnyOper(x) ((x)->umodes & (UMODE_OPER|UMODE_HELPER)) +#define UMODE_OVERRIDE 0x20000 /* able to override */ #define IsOverride(x) ((x)->umodes & UMODE_OVERRIDE) @@ -533,6 +525,7 @@ struct ListClient #define IsSetNoCTCP(x) ((x)->umodes & UMODE_NOCTCP) #define IsSetNoInvite(x) ((x)->umodes & UMODE_NOINVITE) #define IsSetBot(x) ((x)->umodes & UMODE_BOT) +#define IsSetSCallerId(x) ((x)->umodes & UMODE_SCALLERID) #define SetGotId(x) ((x)->flags |= FLAGS_GOTID) #define IsGotId(x) (((x)->flags & FLAGS_GOTID) != 0) @@ -619,4 +612,9 @@ extern char *generate_uid(void); void allocate_away(struct Client *); void free_away(struct Client *); +extern struct Metadata *user_metadata_add(struct Client *target, const char *name, const char *value, int propegate); +extern void user_metadata_delete(struct Client *target, const char *name, int propegate); +extern struct Metadata *user_metadata_find(struct Client *target, const char *name); +extern void user_metadata_clear(struct Client *target); + #endif /* INCLUDED_client_h */