AmendHub

Download:

jcs

/

wallops

/

amendments

/

139

irc: If no hint is passed to irc_add_nick_to_channel, add 10

Also show a watch cursor while we sort nicks, it'll be helpful on
big channels when it looks like we're stuck.

jcs made amendment 139 about 1 year ago
--- irc.c Tue Jan 7 11:50:24 2025 +++ irc.c Tue Jan 14 13:49:32 2025 @@ -985,8 +985,10 @@ irc_process_server(struct irc_connection *conn) case 366: /* end of NAMES output */ if ((channel = irc_find_channel(conn, msg.arg[1]))) { + SetCursor(*(GetCursor(watchCursor))); irc_parse_buffered_names(channel); chatter_sync_nick_list(channel->chatter, channel); + SetCursor(&arrow); } return true; case 372: @@ -1569,6 +1571,8 @@ irc_add_nick_to_channel(struct irc_channel *channel, c short aidx, cidx, ret; if (channel->nnicks >= channel->nicks_size) { + if (count_hint < 10) + count_hint = 10; new_size = channel->nicks_size + count_hint; /* 15% buffer */ new_size += ((new_size * 100) / 666);