From: pk910 Date: Mon, 12 Nov 2012 00:20:49 +0000 (+0100) Subject: Merge branch 'master' into KeepConn X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=fa4486fe3e166152a57a42320fd1f2faee37b0c3;hp=-c Merge branch 'master' into KeepConn Conflicts: include/handlers.h ircd/Makefile.in --- fa4486fe3e166152a57a42320fd1f2faee37b0c3 diff --combined include/handlers.h index 19b64ce,2cb2954..79a052d --- a/include/handlers.h +++ b/include/handlers.h @@@ -125,7 -125,6 +125,7 @@@ extern int m_privs(struct Client*, stru 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*[]); @@@ -135,6 -134,7 +135,7 @@@ extern int m_svsjoin(struct Client*, st 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*[]); @@@ -236,7 -236,7 +237,8 @@@ extern int ms_svsjoin(struct Client*, s 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*[]); @@@ -244,7 -244,6 +246,7 @@@ extern int ms_wallops(struct Client*, s 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 */ diff --combined include/msg.h index 4afde55,e5ed340..f615110 --- a/include/msg.h +++ b/include/msg.h @@@ -88,6 -88,10 +88,10 @@@ struct Client #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 @@@ -336,18 -340,6 +340,18 @@@ #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 diff --combined include/numeric.h index 6de8363,1d8e372..d979e5f --- a/include/numeric.h +++ b/include/numeric.h @@@ -264,12 -264,13 +264,13 @@@ extern const struct Numeric* get_error_ #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 */ @@@ -357,7 -358,6 +358,7 @@@ #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 ? */ @@@ -376,6 -376,7 +377,7 @@@ /* 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 ? */ diff --combined ircd/Makefile.in index c336188,d007a8c..c9057a2 --- a/ircd/Makefile.in +++ b/ircd/Makefile.in @@@ -160,8 -160,7 +160,8 @@@ IRCD_SRC = 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 \ @@@ -180,7 -179,7 +180,8 @@@ m_time.c \ m_topic.c \ m_trace.c \ + m_unzombie.c \ + m_uninvite.c \ m_uping.c \ m_user.c \ m_userhost.c \ @@@ -194,7 -193,6 +195,7 @@@ m_who.c \ m_whois.c \ m_whowas.c \ + m_zombie.c \ match.c \ memdebug.c \ motd.c \ diff --combined ircd/parse.c index c8a0322,fab2743..519049c --- a/ircd/parse.c +++ b/ircd/parse.c @@@ -218,6 -218,13 +218,13 @@@ struct Message msgtab[] = /* 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, @@@ -610,27 -617,6 +617,27 @@@ /* 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, diff --combined ircd/s_err.c index bc7d0ff,1a31ebf..c8a3e58 --- a/ircd/s_err.c +++ b/ircd/s_err.c @@@ -718,7 -718,7 +718,7 @@@ static Numeric replyTable[] = /* 342 */ { 0 }, /* 343 */ - { 0 }, + { RPL_UNINVITE, "%s %s", "343" }, /* 344 */ { 0 }, /* 345 */ @@@ -728,9 -728,9 +728,9 @@@ /* 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 */ @@@ -900,7 -900,7 +900,7 @@@ /* 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 */ @@@ -928,7 -928,7 +928,7 @@@ /* 447 */ { 0 }, /* 448 */ - { 0 }, + { ERR_USERNOTINVITED, "%s %s :is not invited to channel", "448" }, /* 449 */ { 0 }, /* 450 */ diff --combined ircd/s_user.c index f42cf9a,9f45018..2c9a9bc --- a/ircd/s_user.c +++ b/ircd/s_user.c @@@ -589,8 -589,7 +589,8 @@@ static const struct UserMode { FLAG_WEBIRC, 'W' }, { FLAG_SEE_IDLETIME,'t' }, { FLAG_SECURITY_SERV,'D' }, - { FLAG_HIDDENHOST, 'x' } + { FLAG_HIDDENHOST, 'x' }, + { FLAG_NOTCONN, 'Z' } }; /** Length of #userModeList. */ @@@ -1070,6 -1069,25 +1070,25 @@@ hide_hostmask(struct Client *cptr, unsi 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; } @@@ -1300,12 -1318,6 +1319,12 @@@ int set_user_mode(struct Client *cptr, 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; @@@ -1328,8 -1340,6 +1347,8 @@@ 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