Revert autojoin_opers patch

It causes interesting desyncs of account names when run for more than 2
weeks

Revert "channel: refactor fe3c1c828e and fix surrounding indentation"

This reverts commit 27b08207de.

Revert "src/channel: Fix for autojoin_opers segfault"

This reverts commit 8e1c8b7543.
This commit is contained in:
Sam Dodrill 2013-12-26 15:04:19 -08:00
parent be2a7a772c
commit 755b88c783
1 changed files with 13 additions and 21 deletions

View File

@ -2003,28 +2003,20 @@ void user_join(struct Client * client_p, struct Client * source_p, const char *
/* we send the user their join here, because we could have to /* we send the user their join here, because we could have to
* send a mode out next. * send a mode out next.
*/ */
sendto_channel_local_with_capability(ALL_MEMBERS, NOCAPS, CLICAP_EXTENDED_JOIN, chptr, ":%s!%s@%s JOIN %s",
source_p->name, source_p->username, source_p->host, chptr->chname);
sendto_channel_local_with_capability(ALL_MEMBERS, CLICAP_EXTENDED_JOIN, NOCAPS, chptr, ":%s!%s@%s JOIN %s %s %ld :%s",
source_p->name, source_p->username, source_p->host, chptr->chname,
EmptyString(source_p->user->suser) ? "*" : source_p->user->suser,
source_p->tsinfo, source_p->info);
sendto_channel_local_with_capability(ALL_MEMBERS, NOCAPS, CLICAP_EXTENDED_JOIN, chptr, ":%s!%s@%s JOIN %s", /* Send away message to away-notify enabled clients. */
source_p->name, source_p->username, source_p->host, chptr->chname); if (client_p->user->away)
sendto_channel_local_with_capability_butone(client_p, ALL_MEMBERS, CLICAP_AWAY_NOTIFY, NOCAPS, chptr,
sendto_channel_local_with_capability(ALL_MEMBERS, CLICAP_EXTENDED_JOIN, NOCAPS, chptr, ":%s!%s@%s JOIN %s %s %ld :%s", ":%s!%s@%s AWAY :%s", client_p->name, client_p->username,
source_p->name, source_p->username, source_p->host, chptr->chname, client_p->host, client_p->user->away);
EmptyString(source_p->user->suser) ? "*" : source_p->user->suser,
source_p->tsinfo, source_p->info);
/* Send away message to away-notify enabled clients. */
/*
* The following test fixes autojoin_opers in an auth block joining
* clients to channels from segfaulting the irc daemon.
* - Niichan
*/
if (client_p->user && client_p->user->away)
{
sendto_channel_local_with_capability_butone(client_p, ALL_MEMBERS, CLICAP_AWAY_NOTIFY, NOCAPS, chptr,
":%s!%s@%s AWAY :%s", client_p->name, client_p->username,
client_p->host, client_p->user->away);
}
/* its a new channel, set +nt and burst. */ /* its a new channel, set +nt and burst. */
if(flags & CHFL_CHANOP) if(flags & CHFL_CHANOP)