X-Git-Url: http://git.pk910.de/?p=srvx.git;a=blobdiff_plain;f=src%2Fproto.h;h=2bd70b496e4a41bb42fd86ccae92a3e2c3d8bcfa;hp=6ded4dfb49463e798ea758455327894312a4c209;hb=fffe459760943b6ed8e0bb736c87ef424ce38fdc;hpb=4e6b0e24b2f4b6e00df70bd5c2badda8d56fab77 diff --git a/src/proto.h b/src/proto.h index 6ded4df..2bd70b4 100644 --- a/src/proto.h +++ b/src/proto.h @@ -152,6 +152,13 @@ void irc_account(struct userNode *user, const char *stamp, unsigned long timesta void irc_regnick(struct userNode *user); void irc_fakehost(struct userNode *user, const char *host, const char *ident, int force); +/* 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_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, ...); /* RFC1459-compliant numeric responses */ @@ -185,6 +192,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 +202,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 +219,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 +238,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);