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

@ -2019,14 +2019,11 @@ void user_join(struct Client * client_p, struct Client * source_p, const char *
* clients to channels from segfaulting the irc daemon.
* - Niichan
*/
if (client_p->user != NULL)
{
if (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. */