extern int m_proto(struct Client*, struct Client*, int, char*[]);
extern int m_pseudo(struct Client*, struct Client*, int, char*[]);
extern int m_quit(struct Client*, struct Client*, int, char*[]);
+extern int m_recover(struct Client*, struct Client*, int, char*[]);
extern int m_registered(struct Client*, struct Client*, int, char*[]);
extern int m_silence(struct Client*, struct Client*, int, char*[]);
extern int m_stats(struct Client*, struct Client*, int, char*[]);
extern int m_time(struct Client*, struct Client*, int, char*[]);
extern int m_topic(struct Client*, struct Client*, int, char*[]);
extern int m_trace(struct Client*, struct Client*, int, char*[]);
+ extern int m_uninvite(struct Client*, struct Client*, int, char*[]);
extern int m_unregistered(struct Client*, struct Client*, int, char*[]);
extern int m_unsupported(struct Client*, struct Client*, int, char*[]);
extern int m_user(struct Client*, struct Client*, int, char*[]);
extern int ms_svspart(struct Client*, struct Client*, int, char*[]);
extern int ms_topic(struct Client*, struct Client*, int, char*[]);
extern int ms_trace(struct Client*, struct Client*, int, char*[]);
+extern int ms_unzombie(struct Client*, struct Client*, int, char*[]);
+ extern int ms_uninvite(struct Client*, struct Client*, int, char*[]);
extern int ms_uping(struct Client*, struct Client*, int, char*[]);
extern int ms_version(struct Client*, struct Client*, int, char*[]);
extern int ms_wallchops(struct Client*, struct Client*, int, char*[]);
extern int ms_wallusers(struct Client*, struct Client*, int, char*[]);
extern int ms_wallvoices(struct Client*, struct Client*, int, char*[]);
extern int ms_whois(struct Client*, struct Client*, int, char*[]);
+extern int ms_zombie(struct Client*, struct Client*, int, char*[]);
#endif /* INCLUDED_handlers_h */
#define TOK_INVITE "I"
#define CMD_INVITE MSG_INVITE, TOK_INVITE
+ #define MSG_UNINVITE "UNINVITE" /* INVI */
+ #define TOK_UNINVITE "UI"
+ #define CMD_UNINVITE MSG_UNINVITE, TOK_UNINVITE
+
#define MSG_VERSION "VERSION" /* VERS */
#define TOK_VERSION "V"
#define CMD_VERSION MSG_VERSION, TOK_VERSION
#define TOK_ACCOUNT "AC"
#define CMD_ACCOUNT MSG_ACCOUNT, TOK_ACCOUNT
+#define MSG_RECOVER "RECOVER" /* RECOVER */
+#define TOK_RECOVER "RC"
+#define CMD_RECOVER MSG_RECOVER, TOK_RECOVER
+
+#define MSG_ZOMBIE "ZOMBIE" /* ZOMB */
+#define TOK_ZOMBIE "ZO"
+#define CMD_ZOMBIE MSG_ZOMBIE, TOK_ZOMBIE
+
+#define MSG_UNZOMBIE "UNZOMBIE" /* UZMB */
+#define TOK_UNZOMBIE "ZU"
+#define CMD_UNZOMBIE MSG_UNZOMBIE, TOK_UNZOMBIE
+
#define MSG_ASLL "ASLL" /* ASLL */
#define TOK_ASLL "LL"
#define CMD_ASLL MSG_ASLL, TOK_ASLL
#define RPL_USERIP 340 /* Undernet extension */
#define RPL_INVITING 341
/* RPL_SUMMONING 342 removed from RFC1459 */
+ #define RPL_UNINVITE 343
#define RPL_ISSUEDINVITE 345 /* Undernet extension */
#define RPL_INVITELIST 346 /* IRCnet, Undernet extension */
#define RPL_ENDOFINVITELIST 347 /* IRCnet, Undernet extension */
- /* RPL_EXCEPTLIST 348 IRCnet extension */
- /* RPL_ENDOFEXCEPTLIST 349 IRCnet extension */
+ #define RPL_EXCEPTLIST 348 /* IRCnet extension */
+ #define RPL_ENDOFEXCEPTLIST 349 /* IRCnet extension */
#define RPL_VERSION 351
#define RPL_WHOREPLY 352 /* See also RPL_ENDOFWHO */
#define ERR_NONICKNAMEGIVEN 431
#define ERR_ERRONEUSNICKNAME 432
#define ERR_NICKNAMEINUSE 433
+#define ERR_RECOVERDENIED 434
/* ERR_SERVICENAMEINUSE 434 ? */
/* ERR_NORULES 434 unreal */
/* ERR_SERVICECONFUSED 435 ? */
/* ERR_SUMMONDISABLED 445 removed from RFC1459 */
/* ERR_USERSDISABLED 446 removed from RFC1459 */
/* ERR_NONICKCHANGE 447 unreal */
+ #define ERR_USERNOTINVITED 448
#define ERR_NOTREGISTERED 451
/* ERR_IDCOLLISION 452 IRCnet extension ? */
m_proto.c \
m_pseudo.c \
m_quit.c \
- m_rehash.c \
+ m_recover.c \
+ m_rehash.c \
m_relay.c \
m_reset.c \
m_restart.c \
m_time.c \
m_topic.c \
m_trace.c \
+ m_unzombie.c \
+ m_uninvite.c \
m_uping.c \
m_user.c \
m_userhost.c \
m_who.c \
m_whois.c \
m_whowas.c \
+ m_zombie.c \
match.c \
memdebug.c \
motd.c \
/* UNREG, CLIENT, SERVER, OPER, SERVICE */
{ m_unregistered, m_invite, ms_invite, m_invite, m_ignore }
},
+ {
+ MSG_UNINVITE,
+ TOK_UNINVITE,
+ 0, MAXPARA, MFLG_SLOW, 0, NULL,
+ /* UNREG, CLIENT, SERVER, OPER, SERVICE */
+ { m_unregistered, m_uninvite, ms_uninvite, m_uninvite, m_ignore }
+ },
{
MSG_KICK,
TOK_KICK,
/* UNREG, CLIENT, SERVER, OPER, SERVICE */
{ m_ignore, m_ignore, ms_account, m_ignore, m_ignore }
},
+ {
+ MSG_RECOVER,
+ TOK_RECOVER,
+ 0, MAXPARA, MFLG_SLOW, 0, NULL,
+ /* UNREG, CLIENT, SERVER, OPER, SERVICE */
+ { m_unregistered, m_recover, m_ignore, m_recover, m_ignore }
+ },
+ {
+ MSG_ZOMBIE,
+ TOK_ZOMBIE,
+ 0, MAXPARA, MFLG_SLOW, 0, NULL,
+ /* UNREG, CLIENT, SERVER, OPER, SERVICE */
+ { m_ignore, m_ignore, ms_zombie, m_ignore, m_ignore }
+ },
+ {
+ MSG_UNZOMBIE,
+ TOK_UNZOMBIE,
+ 0, MAXPARA, MFLG_SLOW, 0, NULL,
+ /* UNREG, CLIENT, SERVER, OPER, SERVICE */
+ { m_ignore, m_ignore, ms_unzombie, m_ignore, m_ignore }
+ },
{
MSG_ASLL,
TOK_ASLL,
/* 342 */
{ 0 },
/* 343 */
- { 0 },
+ { RPL_UNINVITE, "%s %s", "343" },
/* 344 */
{ 0 },
/* 345 */
/* 347 */
{ RPL_ENDOFINVITELIST, ":End of Invite List", "347" },
/* 348 */
- { 0 },
+ { RPL_EXCEPTLIST, "%s %s %s %Tu", "348" },
/* 349 */
- { 0 },
+ { RPL_ENDOFEXCEPTLIST, "%s :End of Channel Exception List", "349" },
/* 350 */
{ 0 },
/* 351 */
/* 433 */
{ ERR_NICKNAMEINUSE, "%s :Nickname is already in use.", "433" },
/* 434 */
- { 0 },
+ { ERR_RECOVERDENIED, "%s :You may not recover this connection. (%s)", "434" },
/* 435 */
{ 0 },
/* 436 */
/* 447 */
{ 0 },
/* 448 */
- { 0 },
+ { ERR_USERNOTINVITED, "%s %s :is not invited to channel", "448" },
/* 449 */
{ 0 },
/* 450 */
{ FLAG_WEBIRC, 'W' },
{ FLAG_SEE_IDLETIME,'t' },
{ FLAG_SECURITY_SERV,'D' },
- { FLAG_HIDDENHOST, 'x' }
+ { FLAG_HIDDENHOST, 'x' },
+ { FLAG_NOTCONN, 'Z' }
};
/** Length of #userModeList. */
else {
SetDelayedJoin(chan);
}
+
+ /*
+ * Check if the client is actually overriding a ban with the
+ * mask change, if so, kick him out of the channel.
+ * We have to proceed that way to ensure data consistency (join + kick)
+ */
+ if (find_ban(cptr, chan->channel->banlist)) {
+ /* Silentely kick in case of delayed join */
+ if (chan->channel->mode.mode & MODE_DELJOINS) {
+ sendcmdto_one(&his, CMD_KICK, cptr, "%H %C :Ban override", chan->channel, cptr);
+ CheckDelayedJoins(chan->channel);
+
+ } else {
+ /* Otherwise publicly kick */
+ sendcmdto_serv_butone(&me, CMD_KICK, NULL, "%H %C :Ban override", chan->channel, cptr);
+ sendcmdto_channel_butserv_butone(&his, CMD_KICK, chan->channel, NULL, 0, "%H %C :Ban override", chan->channel, cptr);
+ make_zombie(chan, cptr, &me, &me, chan->channel);
+ }
+ }
}
return 0;
}
case 'z': /* Formerly SSL mode; we ignore it. */
break;
#endif
+ case 'Z':
+ if (what == MODE_ADD)
+ SetNotConn(sptr);
+ else
+ ClearNotConn(sptr);
+ break;
default:
send_reply(sptr, ERR_UMODEUNKNOWNFLAG, *m);
break;
ClrFlag(sptr, FLAG_FAKEHOST);
if (!FlagHas(&setflags, FLAG_SEE_IDLETIME) && IsSeeIdletime(sptr))
ClrFlag(sptr, FLAG_SEE_IDLETIME);
+ if (!FlagHas(&setflags, FLAG_NOTCONN) && IsNotConn(sptr))
+ ClrFlag(sptr, FLAG_NOTCONN);
/*
* new umode; servers and privileged opers can set it, local users cannot;
* prevents users from /kick'ing or /mode -o'ing