Skip to content

Commit

Permalink
Backport of r2531, reset +r on registered channels after a netmerge w…
Browse files Browse the repository at this point in the history
…hen our creation time is newer than what we recieved

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2533 5417fbe8-f217-4b02-8779-1006273d7864
  • Loading branch information
Adam- authored and Adam- committed Oct 5, 2009
1 parent 381f74a commit ab337e8
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions src/channels.c
Expand Up @@ -820,10 +820,20 @@ void do_sjoin(const char *source, int ac, char **av)
cumodes[2] = cu->user->nick;
chan_set_modes(source, c, 3, cumodes, 2);
}
if (c->ci && c->ci->bi) {
/* This is ugly, but it always works */
anope_cmd_part(c->ci->bi->nick, c->name, "TS reop");
bot_join(c->ci);
if (c->ci)
{
if (c->ci->bi)
{
/* This is ugly, but it always works */
anope_cmd_part(c->ci->bi->nick, c->name, "TS reop");
bot_join(c->ci);
}
/* Make sure +r is set */
if (ircd->chanreg && ircd->regmode)
{
c->mode |= ircd->regmode;
anope_cmd_mode(whosends(c->ci), c->name, "+r");
}
}
/* XXX simple modes and bans */
} else if (c->creation_time < ts)
Expand Down Expand Up @@ -1864,11 +1874,20 @@ Channel *join_user_update(User * user, Channel * chan, char *name,
modes[2] = cu->user->nick;
chan_set_modes(s_OperServ, chan, 3, modes, 2);
}
if (chan->ci && chan->ci->bi)
if (chan->ci)
{
/* This is ugly, but it always works */
anope_cmd_part(chan->ci->bi->nick, chan->name, "TS reop");
bot_join(chan->ci);
if (chan->ci->bi)
{
/* This is ugly, but it always works */
anope_cmd_part(chan->ci->bi->nick, chan->name, "TS reop");
bot_join(chan->ci);
}
/* Make sure +r is set */
if (ircd->chanreg && ircd->regmode)
{
chan->mode |= ircd->regmode;
anope_cmd_mode(whosends(chan->ci), chan->name, "+r");
}
}
/* XXX simple modes and bans */
}
Expand Down

0 comments on commit ab337e8

Please sign in to comment.