mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 03:03:12 +02:00
irc: set "input_multiline" to 1 in buffers only if capability draft/multiline is enabled (issue #1923)
This commit is contained in:
@@ -1588,6 +1588,29 @@ irc_server_get_default_msg (const char *default_msg,
|
||||
return msg;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets "input_multiline" to 1 or 0, according to capability draft/multiline
|
||||
* on all channels and private buffers.
|
||||
*/
|
||||
|
||||
void
|
||||
irc_server_buffer_set_input_multiline (struct t_irc_server *server,
|
||||
int multiline)
|
||||
{
|
||||
struct t_irc_channel *ptr_channel;
|
||||
|
||||
for (ptr_channel = server->channels; ptr_channel;
|
||||
ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
if (ptr_channel->buffer)
|
||||
{
|
||||
weechat_buffer_set (ptr_channel->buffer,
|
||||
"input_multiline",
|
||||
(multiline) ? "1" : "0");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocates a new server and adds it to the servers queue.
|
||||
*
|
||||
@@ -5725,6 +5748,8 @@ irc_server_disconnect (struct t_irc_server *server, int switch_address,
|
||||
|
||||
irc_server_set_buffer_title (server);
|
||||
|
||||
irc_server_buffer_set_input_multiline (server, 0);
|
||||
|
||||
server->disconnected = 1;
|
||||
|
||||
/* send signal "irc_server_disconnected" with server name */
|
||||
|
||||
Reference in New Issue
Block a user