2004-05-09 Michael Poole <mdpoole@troilus.org>
[ircu2.10.12-pk.git] / include / s_conf.h
index 23b929a86074e763da608277ac0290a248a468aa..ff9a007a4a522db2b1570abd4cddef62fb19dbc7 100644 (file)
 #include <netinet/in.h>        /* struct in_addr */
 #define INCLUDED_netinet_in_h
 #endif
+#include "client.h"
 
 struct Client;
 struct SLink;
 struct TRecord;
+struct Message;
 
 
 /*
@@ -50,19 +52,23 @@ struct TRecord;
  * Structures
  */
 
-struct ConfItem {
-  struct ConfItem*         next;
-  unsigned int             status;      /* If CONF_ILLEGAL, delete when no clients */
-  unsigned int             clients;     /* Number of *LOCAL* clients using this */
-  struct ConnectionClass*  conn_class;  /* Class of connection */
-  struct in_addr           ipnum;       /* ip number of host field */
-  char*                    host;
-  char*                    passwd;
-  char*                    name;
-  time_t                   hold;        /* Hold until this time (calendar time) */
-  int                      dns_pending; /* a dns request is pending */
-  unsigned short           port;
-  char                            bits;        /* Number of bits for ipkills */
+struct ConfItem
+{
+  struct ConfItem *next;
+  unsigned int status;      /* If CONF_ILLEGAL, delete when no clients */
+  unsigned int clients;     /* Number of *LOCAL* clients using this */
+  struct ConnectionClass *conn_class;  /* Class of connection */
+  struct in_addr ipnum;       /* ip number of host field */
+  char *host;
+  char *passwd;
+  char *name;
+  time_t hold; /* Hold until this time (calendar time) */
+  int dns_pending; /* a dns request is pending */
+  unsigned short port;
+  unsigned char bits; /* Number of bits for ipkills. */
+  struct Privs privs; /* Priviledges for opers. */
+  /* Used to detect if a privilege has been touched. */
+  struct Privs privs_dirty;
 };
 
 struct ServerConf {
@@ -78,6 +84,13 @@ struct ServerConf {
   struct ConnectionClass*  conn_class;
 };
 
+struct qline
+{
+  struct qline *next;
+  char *chname;
+  char *reason;
+};
+
 struct DenyConf {
   struct DenyConf*    next;
   char*               hostmask;
@@ -148,6 +161,22 @@ enum AuthorizationCheckResult {
   ACR_BAD_SOCKET
 };
 
+struct nick_host {
+  struct nick_host *next;
+  int nicklen; /* offset of @ part of server string */
+  char nick[1]; /* start of nick@server string */
+};
+
+struct s_map {
+  struct s_map *next;
+  struct Message *msg;
+  char *name;
+  char *command;
+  char *prepend;
+  struct nick_host *services;
+};
+
+
 /*
  * GLOBALS
  */
@@ -157,6 +186,8 @@ extern struct tm        motd_tm;
 extern struct MotdItem* motd;
 extern struct MotdItem* rmotd;
 extern struct TRecord*  tdata;
+extern struct s_map*    GlobalServiceMapList;
+extern struct qline*    GlobalQuarantineList;
 
 /*
  * Proto types
@@ -188,5 +219,9 @@ extern void read_tlines(void);
 extern int find_kill(struct Client *cptr);
 extern int find_restrict(struct Client *cptr);
 extern struct MotdItem* read_motd(const char* motdfile);
+extern const char *find_quarantine(const char* chname);
+extern void lookup_confhost(struct ConfItem *aconf);
+
+extern void yyerror(const char *msg);
 
 #endif /* INCLUDED_s_conf_h */