mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 21:36:37 +02:00
Add IRC command redirection (task #6703)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user