void irc_send_join(irc_channel_t *ic, irc_user_t *iu) { irc_t *irc = ic->irc; if (irc->caps & CAP_EXTENDED_JOIN) { irc_write(irc, ":%s!%s@%s JOIN %s * :%s", iu->nick, iu->user, iu->host, ic->name, iu->fullname); } else { irc_write(irc, ":%s!%s@%s JOIN :%s", iu->nick, iu->user, iu->host, ic->name); } if (iu == irc->user) { if (ic->topic && *ic->topic) { irc_send_topic(ic, FALSE); } irc_send_names(ic); } }
static void irc_cmd_names( irc_t *irc, char **cmd ) { irc_channel_t *ic; if( cmd[1] && ( ic = irc_channel_by_name( irc, cmd[1] ) ) ) irc_send_names( ic ); /* With no args, we should show /names of all chans. Make the code below work well if necessary. else { GSList *l; for( l = irc->channels; l; l = l->next ) irc_send_names( l->data ); } */ }