1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 06:46:38 +02:00

Allow IRC message 301 to be redirected with irc.msgbuffer feature

This commit is contained in:
Sebastien Helleu
2010-02-11 17:07:56 +01:00
parent be8831499d
commit f19000ac4f
3 changed files with 64 additions and 33 deletions
+8 -1
View File
@@ -93,11 +93,15 @@ irc_msgbuffer_get_option (struct t_irc_server *server, const char *message)
* (for example: "invite", "312")
* alias is optional alias for message
* (for example "whois")
* default_buffer is used if no target is
* defined (optional, by default server
* buffer is used)
*/
struct t_gui_buffer *
irc_msgbuffer_get_target_buffer (struct t_irc_server *server, const char *nick,
const char *message, const char *alias)
const char *message, const char *alias,
struct t_gui_buffer *default_buffer)
{
struct t_config_option *ptr_option;
int target;
@@ -109,6 +113,9 @@ irc_msgbuffer_get_target_buffer (struct t_irc_server *server, const char *nick,
if (!ptr_option && alias && alias[0])
ptr_option = irc_msgbuffer_get_option (server, alias);
if (!ptr_option && default_buffer)
return default_buffer;
target = (ptr_option) ?
weechat_config_integer (ptr_option) : -1;