diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2014-01-31 16:41:12 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2014-01-31 16:41:12 +0100 |
commit | 59481611dd5b8918cc7fe1e7dc05837d1e4ae93b (patch) | |
tree | 67eba1a69a13882cabe97fe1bdf275883c8c7fcf /src/plugins/relay/irc | |
parent | ac4e762a0e09fb008655319c0cac90240c7505ef (diff) | |
download | weechat-59481611dd5b8918cc7fe1e7dc05837d1e4ae93b.zip |
relay: send backlog for irc private buffers
Diffstat (limited to 'src/plugins/relay/irc')
-rw-r--r-- | src/plugins/relay/irc/relay-irc.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c index 38415b44f..5b805e9f7 100644 --- a/src/plugins/relay/irc/relay-irc.c +++ b/src/plugins/relay/irc/relay-irc.c @@ -1077,7 +1077,9 @@ void relay_irc_send_join_channels (struct t_relay_client *client) { struct t_infolist *infolist_channels; - const char *channel; + const char *name; + int type; + struct t_gui_buffer *buffer; infolist_channels = weechat_infolist_get ("irc_channel", NULL, client->protocol_args); @@ -1085,10 +1087,22 @@ relay_irc_send_join_channels (struct t_relay_client *client) { while (weechat_infolist_next (infolist_channels)) { - if (weechat_infolist_integer (infolist_channels, "nicks_count") > 0) + name = weechat_infolist_string (infolist_channels, "name"); + type = weechat_infolist_integer (infolist_channels, "type"); + buffer = weechat_infolist_pointer (infolist_channels, "buffer"); + if (type == 0) + { + /* channel */ + if (weechat_infolist_integer (infolist_channels, + "nicks_count") > 0) + { + relay_irc_send_join (client, name); + } + } + else if (type == 1) { - channel = weechat_infolist_string (infolist_channels, "name"); - relay_irc_send_join (client, channel); + /* private */ + relay_irc_send_channel_backlog (client, name, buffer); } } weechat_infolist_free (infolist_channels); |