From c3bb6639b68529ba34a8e6def5dbcb086b41e682 Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Sun, 23 Nov 2008 15:12:32 +0100 Subject: [PATCH] Send after join /names before backlog there're some irc client which create windows, session etc only on 366 packet received (End of /NAMES list) like Miranda IM, QIP that's why backlog sent from bip after 332/333 packets and just before 353/336 goes to nowhere i'v took a look at other irc bouncers, all of them send backlog right after 353 /336 packets so, all what we need is just chamge the order in static void irc_send_join(struct link_client *ic, struct channel *chan) --- src/irc.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/irc.c b/src/irc.c index 93fb48c..4dc8157 100644 --- a/src/irc.c +++ b/src/irc.c @@ -531,6 +531,21 @@ static void irc_send_join(struct link_client *ic, struct channel *chan) WRITE_LINE4(CONN(ic), P_SERV, "333", LINK(ic)->l_server->nick, chan->name, chan->creator, chan->create_ts); + list_t *name_list = channel_name_list(chan); + char *s; + while ((s = list_remove_first(name_list))) { + char tmptype[2]; + tmptype[0] = chan->type; + tmptype[1] = 0; + WRITE_LINE4(CONN(ic), P_SERV, "353", LINK(ic)->l_server->nick, + tmptype, chan->name, s); + free(s); + } + list_free(name_list); + + WRITE_LINE3(CONN(ic), P_SERV, "366", LINK(ic)->l_server->nick, + chan->name, "End of /NAMES list."); + /* XXX: could be more efficient */ if (!user->backlog) { mylog(LOG_DEBUG, "Backlog disabled for %s, not backlogging", @@ -550,21 +565,6 @@ static void irc_send_join(struct link_client *ic, struct channel *chan) mylog(LOG_DEBUG, "Nothing to backlog for %s/%s", user->name, chan->name); } - - list_t *name_list = channel_name_list(chan); - char *s; - while ((s = list_remove_first(name_list))) { - char tmptype[2]; - tmptype[0] = chan->type; - tmptype[1] = 0; - WRITE_LINE4(CONN(ic), P_SERV, "353", LINK(ic)->l_server->nick, - tmptype, chan->name, s); - free(s); - } - list_free(name_list); - - WRITE_LINE3(CONN(ic), P_SERV, "366", LINK(ic)->l_server->nick, - chan->name, "End of /NAMES list."); } static void write_init_string(connection_t *c, struct line *line, char *nick)