struct in_addr cli_ip; /* Real ip# NOT defined for remote servers! */
short cli_status; /* Client type */
unsigned char cli_local; /* local or remote client */
+ unsigned int cli_privs; /* Oper privileges */
char cli_name[HOSTLEN + 1]; /* Unique name of the client, nick or host */
char cli_username[USERLEN + 1]; /* username here now for auth stuff */
char cli_info[REALLEN + 1]; /* Free form additional client information */
#define cli_ip(cli) ((cli)->cli_ip)
#define cli_status(cli) ((cli)->cli_status)
#define cli_local(cli) ((cli)->cli_local)
+#define cli_privs(cli) ((cli)->cli_privs)
#define cli_name(cli) ((cli)->cli_name)
#define cli_username(cli) ((cli)->cli_username)
#define cli_info(cli) ((cli)->cli_info)
#define SNO_OPER (SNO_CONNEXIT|SNO_OLDREALOP)
#define SNO_NOISY (SNO_SERVKILL|SNO_UNAUTH)
+#define PRIV_CHAN_LIMIT 0x00000001 /* no channel limit on oper */
+#define PRIV_MODE_LCHAN 0x00000002 /* oper can mode local chans */
+#define PRIV_WALK_LCHAN 0x00000004 /* oper can walk thru local modes */
+#define PRIV_DEOP_LCHAN 0x00000008 /* no deop oper on local chans */
+#define PRIV_SHOW_INVIS 0x00000010 /* show local invisible users */
+#define PRIV_SHOW_ALL_INVIS 0x00000020 /* show all invisible users */
+#define PRIV_UNLIMIT_QUERY 0x00000040 /* unlimit who queries */
+
+#define PRIV_KILL 0x00000080 /* oper can KILL */
+#define PRIV_LOCAL_KILL 0x00000100 /* oper can local KILL */
+#define PRIV_REHASH 0x00000200 /* oper can REHASH */
+#define PRIV_RESTART 0x00000400 /* oper can RESTART */
+#define PRIV_DIE 0x00000800 /* oper can DIE */
+#define PRIV_GLINE 0x00001000 /* oper can GLINE */
+#define PRIV_LOCAL_GLINE 0x00002000 /* oper can local GLINE */
+#define PRIV_JUPE 0x00004000 /* oper can JUPE */
+#define PRIV_LOCAL_JUPE 0x00008000 /* oper can local JUPE */
+#define PRIV_OPMODE 0x00010000 /* oper can OP/CLEARMODE */
+#define PRIV_LOCAL_OPMODE 0x00020000 /* oper can local OP/CLEARMODE */
+#define PRIV_SET 0x00040000 /* oper can SET */
+#define PRIV_WHOX 0x00080000 /* oper can use /who x */
+#define PRIV_BADCHAN 0x00100000 /* oper can BADCHAN */
+#define PRIV_LOCAL_BADCHAN 0x00200000 /* oper can local BADCHAN */
+#define PRIV_SEE_CHAN 0x00400000 /* oper can see in secret chans */
+
+#define PRIV_PROPAGATE 0x00800000 /* propagate oper status */
+#define PRIV_DISPLAY 0x01000000 /* "Is an oper" displayed */
+#define PRIV_SEE_OPERS 0x02000000 /* display hidden opers */
+
+#define HasPriv(cli, priv) (cli_privs(cli) & (priv))
+
typedef enum ShowIPType {
HIDE_IP,
SHOW_IP,
extern const char* get_client_name(const struct Client* sptr, int showip);
extern int client_get_ping(const struct Client* local_client);
-
+extern void client_drop_sendq(struct Connection* con);
+extern void client_add_sendq(struct Connection* con,
+ struct Connection** con_p);
+extern void client_set_privs(struct Client* client);
#endif /* INCLUDED_client_h */