diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-01-08 19:13:59 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-01-08 19:13:59 +0000 |
commit | 05992a34f3c7b0b252fe863ba1561963cdb02d22 (patch) | |
tree | 903388474a42475ada14dd95a44f88d3dc10eaa1 /src/common | |
parent | 224cd3ff596f8b92407f3aca15c502910ab1ca76 (diff) | |
download | weechat-05992a34f3c7b0b252fe863ba1561963cdb02d22.zip |
Encode commands like text with channel's encoding charset
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/command.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/command.c b/src/common/command.c index 4a836e49d..c66ecf79f 100644 --- a/src/common/command.c +++ b/src/common/command.c @@ -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", |