added modes parameter to srvx.conf to control user modes
[srvx.git] / src / proto.h
index 09db7c33f845cd74fb10e94cc7d148cb6e46841e..3f4143bbb100347322d75a844a076994f1f04186 100644 (file)
@@ -30,6 +30,7 @@
 #define COMBO_NUMERIC_LEN 5   /* 1/2, 1/3 or 2/3 digits for server/client parts */
 #define MAXLEN         512   /* Maximum IRC line length */
 #define MAXNUMPARAMS    200
+#define ALLCHANMSG_FUNCS_MAX  4 /* +1 == 5 potential 'allchanmsg' funcs */
 
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
@@ -95,11 +96,14 @@ int parse_line(char *line, int recursive);
 /* Callback notifications for protocol support. */
 typedef void (*chanmsg_func_t) (struct userNode *user, struct chanNode *chan, char *text, struct userNode *bot);
 void reg_chanmsg_func(unsigned char prefix, struct userNode *service, chanmsg_func_t handler);
+void reg_allchanmsg_func(struct userNode *service, chanmsg_func_t handler);
 struct userNode *get_chanmsg_bot(unsigned char prefix);
 
 typedef void (*privmsg_func_t) (struct userNode *user, struct userNode *target, char *text, int server_qualified);
 void reg_privmsg_func(struct userNode *user, privmsg_func_t handler);
 void reg_notice_func(struct userNode *user, privmsg_func_t handler);
+void unreg_privmsg_func(struct userNode *user, privmsg_func_t handler);
+void unreg_notice_func(struct userNode *user, privmsg_func_t handler);
 
 typedef void (*oper_func_t) (struct userNode *user);
 void reg_oper_func(oper_func_t handler);
@@ -123,6 +127,7 @@ void irc_squit(struct server *srv, const char *message, const char *service_mess
 /* messages */
 void irc_privmsg(struct userNode *from, const char *to, const char *message);
 void irc_notice(struct userNode *from, const char *to, const char *message);
+void irc_notice_user(struct userNode *from, struct userNode *to, const char *message);
 void irc_wallchops(struct userNode *from, const char *to, const char *message);
 
 /* channel maintenance */
@@ -147,6 +152,7 @@ void irc_svsnick(struct userNode *from, struct userNode *target, const char *new
 /* account maintenance */
 void irc_account(struct userNode *user, const char *stamp);
 void irc_regnick(struct userNode *user);
+void irc_fakehost(struct userNode *user, const char *host);
 
 /* numeric messages */
 void irc_numeric(struct userNode *user, unsigned int num, const char *format, ...);
@@ -163,7 +169,7 @@ void irc_numeric(struct userNode *user, unsigned int num, const char *format, ..
 /* stuff originally from other headers that is really protocol-specific */
 int IsChannelName(const char *name);
 int is_valid_nick(const char *nick);
-struct userNode *AddService(const char *nick, const char *desc);
+struct userNode *AddService(const char *nick, const char *modes, const char *desc, const char *hostname);
 struct userNode *AddClone(const char *nick, const char *ident, const char *hostname, const char *desc);
 struct server* AddServer(struct server* uplink, const char *name, int hops, time_t boot, time_t link, const char *numeric, const char *description);
 void DelServer(struct server* serv, int announce, const char *message);
@@ -199,6 +205,7 @@ struct mod_chanmode {
 #define MCP_ALLOW_OVB     0x0001 /* allow op, voice, ban manipulation */
 #define MCP_FROM_SERVER   0x0002 /* parse as from a server */
 #define MCP_KEY_FREE      0x0004 /* -k without a key argument */
+#define MCP_REGISTERED   0x0008 /* chan is already registered; do not allow changes to MODE_REGISTERED */
 #define MC_ANNOUNCE       0x0100 /* send a mod_chanmode() change out */
 #define MC_NOTIFY         0x0200 /* make local callbacks to announce */
 #ifdef NDEBUG