diff options
author | Timo Sirainen <cras@irssi.org> | 2001-12-09 17:13:10 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-12-09 17:13:10 +0000 |
commit | a8419ed5b93af2c063ca90a4f34ffe36d88458a2 (patch) | |
tree | 798e2aa189fb5a2593d17afefd7ad3780a1d942d /src/fe-common/irc/fe-irc-channels.c | |
parent | e8696c711e3bd81ec65673ee611e13b6c7d154b2 (diff) | |
download | irssi-a8419ed5b93af2c063ca90a4f34ffe36d88458a2.zip |
Support for OPN's channel forwarding.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2227 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-irc-channels.c')
-rw-r--r-- | src/fe-common/irc/fe-irc-channels.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/fe-common/irc/fe-irc-channels.c b/src/fe-common/irc/fe-irc-channels.c index 853fe587..67277191 100644 --- a/src/fe-common/irc/fe-irc-channels.c +++ b/src/fe-common/irc/fe-irc-channels.c @@ -23,9 +23,12 @@ #include "signals.h" #include "levels.h" +#include "irc-channels.h" #include "channel-rejoin.h" #include "printtext.h" +#include "fe-windows.h" +#include "window-items.h" static void sig_channel_rejoin(SERVER_REC *server, REJOIN_REC *rec) { @@ -35,12 +38,28 @@ static void sig_channel_rejoin(SERVER_REC *server, REJOIN_REC *rec) IRCTXT_CHANNEL_REJOIN, rec->channel); } +static void sig_event_forward(SERVER_REC *server, const char *data) +{ + IRC_CHANNEL_REC *channel; + char *params, *from, *to; + + params = event_get_params(data, 3, NULL, &from, &to); + channel = irc_channel_find(server, from); + if (channel != NULL) { + window_bind_add(window_item_window(channel), + server->tag, to); + } + g_free(params); +} + void fe_irc_channels_init(void) { signal_add("channel rejoin new", (SIGNAL_FUNC) sig_channel_rejoin); + signal_add_first("event 379", (SIGNAL_FUNC) sig_event_forward); } void fe_irc_channels_deinit(void) { signal_remove("channel rejoin new", (SIGNAL_FUNC) sig_channel_rejoin); + signal_remove("event 379", (SIGNAL_FUNC) sig_event_forward); } |