mirror of
https://github.com/weechat/weechat.git
synced 2026-07-08 18:53:12 +02:00
irc: remove function irc_color_decode_for_user_entry
Since commitsd03eb52d49and0c48b7ab8b, the IRC color codes are the same in input line and messages, so the function irc_color_decode_for_user_entry is not needed any more. It was used only to decode colors when completing the command /topic (with the channel topic).
This commit is contained in:
@@ -409,7 +409,7 @@ irc_completion_channel_topic_cb (void *data, const char *completion_item,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
char *topic, *topic_color;
|
||||
char *topic;
|
||||
int length;
|
||||
|
||||
IRC_BUFFER_GET_SERVER_CHANNEL(buffer);
|
||||
@@ -442,12 +442,9 @@ irc_completion_channel_topic_cb (void *data, const char *completion_item,
|
||||
else
|
||||
topic = strdup (ptr_channel->topic);
|
||||
|
||||
topic_color = irc_color_decode_for_user_entry ((topic) ? topic : ptr_channel->topic);
|
||||
weechat_hook_completion_list_add (completion,
|
||||
(topic_color) ? topic_color : ((topic) ? topic : ptr_channel->topic),
|
||||
(topic) ? topic : ptr_channel->topic,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
if (topic_color)
|
||||
free (topic_color);
|
||||
if (topic)
|
||||
free (topic);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user