/* proto.h - IRC protocol output
* Copyright 2000-2004 srvx Development Team
*
- * This file is part of srvx.
+ * This file is part of x3.
*
- * srvx is free software; you can redistribute it and/or modify
+ * x3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
/* Warning for those looking at how this code does multi-protocol
* support: It's an awful, nasty hack job. It is intended for short
- * term use, not long term, since we are already developing srvx2,
+ * term use, not long term, since we are already developing x3,
* which has much nicer interfaces that hide most of the ugly
* differences between protocol dialects. */
#endif
struct gline;
+struct shun;
struct server;
struct userNode;
struct chanNode;
char *host;
int port;
- struct sockaddr_in *bind_addr;
+ struct sockaddr *bind_addr;
int bind_addr_len;
char *password;
typedef void (*oper_func_t) (struct userNode *user);
void reg_oper_func(oper_func_t handler);
-extern struct userList dead_users;
-
/* replay silliness */
void replay_read_line(void);
void replay_event_loop(void);
void irc_join(struct userNode *who, struct chanNode *what);
void irc_invite(struct userNode *from, struct userNode *who, struct chanNode *to);
void irc_mode(struct userNode *who, struct chanNode *target, const char *modes);
+void irc_umode(struct userNode *target, const char *modes);
void irc_kick(struct userNode *who, struct userNode *target, struct chanNode *from, const char *msg);
void irc_part(struct userNode *who, struct chanNode *what, const char *reason);
-void irc_topic(struct userNode *who, struct chanNode *what, const char *topic);
+void irc_topic(struct userNode *service, struct userNode *who, struct chanNode *what, const char *topic);
void irc_fetchtopic(struct userNode *from, const char *to);
/* network maintenance */
-void irc_gline(struct server *srv, struct gline *gline);
+void irc_silence(struct userNode *who, const char *mask, int add);
+void irc_gline(struct server *srv, struct gline *gline, int silent);
+void irc_shun(struct server *srv, struct shun *shun);
void irc_settime(const char *srv_name_mask, time_t new_time);
void irc_ungline(const char *mask);
+void irc_unshun(const char *mask);
void irc_error(const char *to, const char *message);
void irc_kill(struct userNode *from, struct userNode *target, const char *message);
void irc_raw(const char *what);
void irc_stats(struct userNode *from, struct server *target, char type);
void irc_svsnick(struct userNode *from, struct userNode *target, const char *newnick);
+void irc_swhois(struct userNode *from, struct userNode *target, const char *message);
/* account maintenance */
-void irc_account(struct userNode *user, const char *stamp);
+void irc_rename(struct userNode *user, const char *new_handle);
+void irc_delete(struct userNode *user);
+void irc_account(struct userNode *user, const char *stamp, time_t timestamp);
void irc_regnick(struct userNode *user);
void irc_fakehost(struct userNode *user, const char *host);
unsigned int alloc_argc;
#endif
char new_key[KEYLEN + 1];
+ char new_upass[KEYLEN + 1];
+ char new_apass[KEYLEN + 1];
struct {
unsigned int mode;
union {
#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 MC_ANNOUNCE 0x0100 /* send a mod_chanmode() change out */
#define MC_NOTIFY 0x0200 /* make local callbacks to announce */
#ifdef NDEBUG
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);
+struct mod_chanmode *mod_chanmode_parse(struct chanNode *channel, 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);
#define GENMASK_USENICK 2
#define GENMASK_OMITNICK 4 /* Hurray for Kevin! */
#define GENMASK_BYIP 8
-#define GENMASK_SRVXMASK 16
+#define GENMASK_X3MASK 16
#define GENMASK_NO_HIDING 128
char *generate_hostmask(struct userNode *user, int options);