X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fproto.h;h=94fa635a3365be3a4f4a34bfdeab3088898cf3dd;hb=HEAD;hp=6ded4dfb49463e798ea758455327894312a4c209;hpb=9463469d5c5081b7b11f08d74a1ed5be879d9da7;p=srvx.git diff --git a/src/proto.h b/src/proto.h index 6ded4df..94fa635 100644 --- a/src/proto.h +++ b/src/proto.h @@ -151,6 +151,16 @@ void irc_xresponse(struct server *target, const char *routing, const char *respo void irc_account(struct userNode *user, const char *stamp, unsigned long timestamp, unsigned long serial); void irc_regnick(struct userNode *user); void irc_fakehost(struct userNode *user, const char *host, const char *ident, int force); +void irc_keepconn(struct userNode *target, unsigned int timeout); + +/* svs maintenance */ +void irc_svsmode(struct userNode *from, struct userNode *user, const char *modes); +void irc_svsjoin(struct userNode *from, struct userNode *user, struct chanNode *chan); +void irc_svsjoinchan(struct userNode *from, struct userNode *user, const char *chan); +void irc_svspart(struct userNode *from, struct userNode *user, struct chanNode *chan); +void irc_svspartchan(struct userNode *from, struct userNode *user, const char *chan); +void irc_relay(char *message); +void irc_simul(struct userNode *target, char *command); /* numeric messages */ void irc_numeric(struct userNode *user, unsigned int num, const char *format, ...); @@ -185,6 +195,8 @@ unsigned int irc_user_modes(const struct userNode *user, char modes[], size_t le /* Channel mode manipulation */ #define KEYLEN 23 +#define NOFLOODLEN 15 +#define CHANNELLEN 200 typedef unsigned long chan_mode_t; /* Rules for struct mod_chanmode: * For a membership mode change, args[n].mode can contain more than @@ -193,11 +205,13 @@ typedef unsigned long chan_mode_t; */ struct mod_chanmode { chan_mode_t modes_set, modes_clear; - unsigned int new_limit, argc; + unsigned int new_limit, new_access, argc; #ifndef NDEBUG unsigned int alloc_argc; #endif char new_key[KEYLEN + 1]; + char new_altchan[CHANNELLEN + 1]; + char new_noflood[NOFLOODLEN + 1]; char new_upass[KEYLEN + 1]; char new_apass[KEYLEN + 1]; struct { @@ -208,15 +222,17 @@ struct mod_chanmode { } u; } args[1]; }; -#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 MCP_UPASS_FREE 0x0010 /* -U without a key argument */ -#define MCP_APASS_FREE 0x0020 /* -A without a key argument */ -#define MCP_NO_APASS 0x0040 /* Do not allow +/-A or +/-U */ -#define MC_ANNOUNCE 0x0100 /* send a mod_chanmode() change out */ -#define MC_NOTIFY 0x0200 /* make local callbacks to announce */ +#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 MCP_UPASS_FREE 0x0010 /* -U without a key argument */ +#define MCP_APASS_FREE 0x0020 /* -A without a key argument */ +#define MCP_NO_APASS 0x0040 /* Do not allow +/-A or +/-U */ +#define MCP_IGN_REGISTERED 0x0080 /* chan is already registered; ignore changes to MODE_REGISTERED */ +#define MC_ANNOUNCE 0x0100 /* send a mod_chanmode() change out */ +#define MC_NOTIFY 0x0200 /* make local callbacks to announce */ +#define MCP_OPERMODE 0x0400 #ifdef NDEBUG #define mod_chanmode_init(CHANMODE) do { memset((CHANMODE), 0, sizeof(*CHANMODE)); } while (0) #else @@ -225,7 +241,7 @@ struct mod_chanmode { struct mod_chanmode *mod_chanmode_alloc(unsigned int argc); struct mod_chanmode *mod_chanmode_dup(struct mod_chanmode *orig, unsigned int extra); -struct mod_chanmode *mod_chanmode_parse(struct chanNode *channel, char **modes, unsigned int argc, unsigned int flags, short base_oplevel); +struct mod_chanmode *mod_chanmode_parse(struct chanNode *channel, struct userNode *user, char **modes, unsigned int argc, unsigned int flags, short base_oplevel); void mod_chanmode_apply(struct userNode *who, struct chanNode *channel, struct mod_chanmode *change); void mod_chanmode_announce(struct userNode *who, struct chanNode *channel, struct mod_chanmode *change); char *mod_chanmode_format(struct mod_chanmode *desc, char *buffer);