summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/irc/irc.c')
-rw-r--r--src/plugins/irc/irc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/irc/irc.c b/src/plugins/irc/irc.c
index 61737e64f..68e3abb3c 100644
--- a/src/plugins/irc/irc.c
+++ b/src/plugins/irc/irc.c
@@ -40,6 +40,7 @@
#include "irc-channel.h"
#include "irc-nick.h"
#include "irc-raw.h"
+#include "irc-redirect.h"
#include "irc-upgrade.h"
@@ -164,6 +165,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
irc_info_init ();
+ irc_redirect_init ();
+
/* hook some signals */
irc_debug_init ();
weechat_hook_signal ("quit", &irc_signal_quit_cb, NULL);
@@ -173,6 +176,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_hook_signal ("xfer_send_accept_resume", &irc_server_xfer_send_accept_resume_cb, NULL);
weechat_hook_signal ("irc_input_send", &irc_input_send_cb, NULL);
+ /* hook hsignals for redirection */
+ weechat_hook_hsignal ("irc_redirect_pattern", &irc_redirect_pattern_hsignal_cb, NULL);
+ weechat_hook_hsignal ("irc_redirect_command", &irc_redirect_command_hsignal_cb, NULL);
+
/* modifiers */
weechat_hook_modifier ("irc_color_decode", &irc_color_modifier_cb, NULL);
weechat_hook_modifier ("irc_color_encode", &irc_color_modifier_cb, NULL);
@@ -262,5 +269,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
irc_config_free ();
+ irc_redirect_end ();
+
return WEECHAT_RC_OK;
}