~rcr/rirc

1cc35bc916199ff641db9fdded4e47f96cce7e33 — Richard Robbins a month ago 597c7e2
fix incorrect status for channels when not joined
1 files changed, 6 insertions(+), 9 deletions(-)

M src/draw.c
M src/draw.c => src/draw.c +6 -9
@@ 636,13 636,13 @@ static void
draw_status(struct channel *c)
{
	/* server buffer:
	 *  -[usermodes]-(ping)-(scrollback)
	 *  -[+usermodes]-(ping)-(scrollback)
	 *
	 * private buffer:
	 *  -[usermodes]-[priv]-(ping)-(scrollback)
	 *  -[+usermodes]-[priv]-(ping)-(scrollback)
	 *
	 * channel buffer:
	 *  -[usermodes]-[chantype chanmodes chancount]-(ping)-(scrollback)
	 *  -[+usermodes]-[+chanmodes chancount]-(ping)-(scrollback)
	 */

	#define STATUS_SEP_HORZ \


@@ 673,14 673,11 @@ draw_status(struct channel *c)
			return;
	}

	/* -[chantype chanmodes chancount] */
	if (c->type == CHANNEL_T_CHANNEL) {
	/* -[chanmodes chancount] */
	if (c->type == CHANNEL_T_CHANNEL && c->joined) {
		if (!drawf(&cols, STATUS_SEP_HORZ))
			return;
		if (!drawf(&cols, "[%c %s %u]",
				c->chanmodes.prefix,
				c->chanmodes_str.str,
				c->users.count))
		if (!drawf(&cols, "[+%s %u]", c->chanmodes_str.str, c->users.count))
			return;
	}