From 27b08207de7dc8b90c22c6d6aa37e93b39c57138 Mon Sep 17 00:00:00 2001 From: Kyle Jonhson Date: Fri, 15 Nov 2013 05:00:40 +0000 Subject: [PATCH] channel: refactor fe3c1c828eea7aa67da00627750c8b4312d2ecd0 and fix surrounding indentation --- src/channel.c | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/src/channel.c b/src/channel.c index a7ee7ca..49bca01 100644 --- a/src/channel.c +++ b/src/channel.c @@ -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 * 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); - /* - * The following test fixes autojoin_opers in an auth block joining - * clients to channels from segfaulting the irc daemon. - * - Niichan - */ - if (client_p->user != NULL) - { - if (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); - } - } + 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. */ + + /* + * 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. */ if(flags & CHFL_CHANOP)