channel: refactor fe3c1c828e and fix surrounding indentation

This commit is contained in:
Kyle Jonhson 2013-11-15 05:00:40 +00:00
parent 502490b13a
commit 27b08207de
1 changed files with 20 additions and 23 deletions

View File

@ -2003,31 +2003,28 @@ 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);
/* Send away message to away-notify enabled clients. */ 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",
* The following test fixes autojoin_opers in an auth block joining source_p->name, source_p->username, source_p->host, chptr->chname,
* clients to channels from segfaulting the irc daemon. EmptyString(source_p->user->suser) ? "*" : source_p->user->suser,
* - Niichan source_p->tsinfo, source_p->info);
*/
if (client_p->user != NULL) /* Send away message to away-notify enabled clients. */
{
if (client_p->user->away) /*
{ * The following test fixes autojoin_opers in an auth block joining
sendto_channel_local_with_capability_butone(client_p, ALL_MEMBERS, CLICAP_AWAY_NOTIFY, NOCAPS, chptr, * clients to channels from segfaulting the irc daemon.
":%s!%s@%s AWAY :%s", client_p->name, client_p->username, * - Niichan
client_p->host, client_p->user->away); */
} 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)