Log message:
Get rid of MAGIC_REMOTE_JOIN_TS--hasn't been needed for a long time, we've
just been lazy. Also, fix two bugs having to do with remote users joining
channels: 1) If the timestamps were the same, everybody got deopped; 2) the
deops weren't actually happening, just shown. Now, the deops actually
happen, and the deop loop is only entered if the remote join TS is older
(less than) the channel timestamp or if the channel is a zannel.
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1580
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
+2005-12-23 Kevin L. Mitchell <klmitch@mit.edu>
+
+ * ircd/m_join.c: get rid of MAGIC_REMOTE_JOIN_TS; perform the
+ deop-other-users loop only when creation < channel timestamp or
+ when the channel in question happens to be a zannel; actually deop
+ users, don't just say we are and not do it
+
+ * ircd/m_create.c (ms_create): get rid of MAGIC_REMOTE_JOIN_TS
+
+ * include/channel.h: get rid of MAGIC_REMOTE_JOIN_TS
+
2005-12-13 Michael Poole <mdpoole@troilus.org>
* configure.in: Define a macro when compiling on Solaris.
*/
#define TS_LAG_TIME 86400
-/**
- * A Magic TS that is used for channels that are created by JOIN,
- * a channel with this TS accepts all TS without complaining that
- * it might receive later via MODE or CREATE.
- *
- * Part of the P9 compatibility, shouldn't occur on a P10 network.
- */
-#define MAGIC_REMOTE_JOIN_TS 1270080000
-
extern const char* const PartFmt1;
/* A create that didn't appear during a burst has that servers idea of
* the current time. Use it for lag calculations.
*/
- if (!IsBurstOrBurstAck(sptr) && 0 != chanTS &&
- MAGIC_REMOTE_JOIN_TS != chanTS)
+ if (!IsBurstOrBurstAck(sptr) && 0 != chanTS)
cli_serv(cli_user(sptr)->server)->lag = TStime() - chanTS;
/* If this server is >1 minute fast, warn */
/* Check if we need to bounce a mode */
if (TStime() - chanTS > TS_LAG_TIME ||
(chptr->creationtime && chanTS > chptr->creationtime &&
- chptr->creationtime != MAGIC_REMOTE_JOIN_TS &&
/* Accept CREATE for zannels. This is only really necessary on a network
with servers prior to 2.10.12.02: we just accept their TS and ignore
the fact that it was a zannel. The influence of this on a network
}
flags |= HasFlag(sptr, FLAG_TS8) ? CHFL_SERVOPOK : 0;
- /* when the network is 2.10.11+ then remove MAGIC_REMOTE_JOIN_TS */
- chptr->creationtime = creation ? creation : MAGIC_REMOTE_JOIN_TS;
+ chptr->creationtime = creation;
}
else { /* We have a valid channel? */
if ((member = find_member_link(chptr, sptr)))
non-existent, it does not bounce the create with the newer
timestamp.)
*/
- if (creation && creation - ((!chptr->mode.apass[0] && chptr->users == 0) ? 1 : 0) <= chptr->creationtime)
- {
+ if (creation && (creation < chptr->creationtime ||
+ (!chptr->mode.apass[0] && chptr->users == 0))) {
struct Membership *member;
struct ModeBuf mbuf;
modebuf_init(&mbuf, sptr, cptr, chptr, MODEBUF_DEST_CHANNEL | MODEBUF_DEST_HACK3 | MODEBUF_DEST_SERVER);
for (member = chptr->members; member; member = member->next_member)
{
- if (IsChanOp(member))
+ if (IsChanOp(member)) {
modebuf_mode_client(&mbuf, MODE_DEL | MODE_CHANOP, member->user, OpLevel(member));
+ member->status &= ~CHFL_CHANOP;
+ }
}
modebuf_flush(&mbuf);
}