1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 17:23:15 +02:00

Encode commands like text with channel's encoding charset

This commit is contained in:
Sebastien Helleu
2006-01-08 19:13:59 +00:00
parent 224cd3ff59
commit 05992a34f3
2 changed files with 16 additions and 4 deletions
+8 -2
View File
@@ -772,7 +772,13 @@ user_command (t_gui_buffer *buffer, t_irc_server *server, char *command)
if ((command[0] == '/') && (command[1] != '/'))
{
/* WeeChat internal command (or IRC command) */
(void) exec_weechat_command (ptr_window, server, command);
command_encoded = channel_iconv_encode (SERVER(buffer),
CHANNEL(buffer),
command);
(void) exec_weechat_command (ptr_window, server,
(command_encoded) ? command_encoded : command);
if (command_encoded)
free (command_encoded);
}
else
{
@@ -786,7 +792,7 @@ user_command (t_gui_buffer *buffer, t_irc_server *server, char *command)
command_encoded = channel_iconv_encode (SERVER(buffer),
CHANNEL(buffer),
(command_with_colors) ? command_with_colors: command);
(command_with_colors) ? command_with_colors : command);
if (CHANNEL(buffer)->dcc_chat)
dcc_chat_sendf ((t_irc_dcc *)(CHANNEL(buffer)->dcc_chat),
"%s\r\n",
+8 -2
View File
@@ -772,7 +772,13 @@ user_command (t_gui_buffer *buffer, t_irc_server *server, char *command)
if ((command[0] == '/') && (command[1] != '/'))
{
/* WeeChat internal command (or IRC command) */
(void) exec_weechat_command (ptr_window, server, command);
command_encoded = channel_iconv_encode (SERVER(buffer),
CHANNEL(buffer),
command);
(void) exec_weechat_command (ptr_window, server,
(command_encoded) ? command_encoded : command);
if (command_encoded)
free (command_encoded);
}
else
{
@@ -786,7 +792,7 @@ user_command (t_gui_buffer *buffer, t_irc_server *server, char *command)
command_encoded = channel_iconv_encode (SERVER(buffer),
CHANNEL(buffer),
(command_with_colors) ? command_with_colors: command);
(command_with_colors) ? command_with_colors : command);
if (CHANNEL(buffer)->dcc_chat)
dcc_chat_sendf ((t_irc_dcc *)(CHANNEL(buffer)->dcc_chat),
"%s\r\n",