mirror of
https://github.com/weechat/weechat.git
synced 2026-07-01 15:26:37 +02:00
irc: add support of capability "draft/multiline" (closes #1923)
This commit is contained in:
@@ -1105,27 +1105,38 @@ irc_command_me_channel (struct t_irc_server *server,
|
||||
const char *arguments)
|
||||
{
|
||||
struct t_arraylist *list_messages;
|
||||
int i, list_size;
|
||||
char **list_arguments;
|
||||
int i, j, list_size, count_arguments;
|
||||
|
||||
list_messages = irc_server_sendf (
|
||||
server,
|
||||
IRC_SERVER_SEND_OUTQ_PRIO_HIGH | IRC_SERVER_SEND_RETURN_LIST,
|
||||
NULL,
|
||||
"PRIVMSG %s :\01ACTION %s\01",
|
||||
channel->name,
|
||||
(arguments && arguments[0]) ? arguments : "");
|
||||
if (list_messages)
|
||||
list_arguments = weechat_string_split ((arguments) ? arguments : "",
|
||||
"\n", NULL, 0, 0, &count_arguments);
|
||||
if (!list_arguments)
|
||||
return;
|
||||
|
||||
for (i = 0; i < count_arguments; i++)
|
||||
{
|
||||
list_size = weechat_arraylist_size (list_messages);
|
||||
for (i = 0; i < list_size; i++)
|
||||
list_messages = irc_server_sendf (
|
||||
server,
|
||||
IRC_SERVER_SEND_OUTQ_PRIO_HIGH | IRC_SERVER_SEND_RETURN_LIST,
|
||||
NULL,
|
||||
"PRIVMSG %s :\01ACTION %s\01",
|
||||
channel->name,
|
||||
list_arguments[i]);
|
||||
if (list_messages)
|
||||
{
|
||||
irc_command_me_channel_display (
|
||||
server,
|
||||
channel,
|
||||
(const char *)weechat_arraylist_get (list_messages, i));
|
||||
list_size = weechat_arraylist_size (list_messages);
|
||||
for (j = 0; j < list_size; j++)
|
||||
{
|
||||
irc_command_me_channel_display (
|
||||
server,
|
||||
channel,
|
||||
(const char *)weechat_arraylist_get (list_messages, j));
|
||||
}
|
||||
weechat_arraylist_free (list_messages);
|
||||
}
|
||||
weechat_arraylist_free (list_messages);
|
||||
}
|
||||
|
||||
weechat_string_free_split (list_arguments);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -6950,8 +6961,8 @@ irc_command_init ()
|
||||
"\n"
|
||||
"Capabilities supported by WeeChat are: "
|
||||
"account-notify, away-notify, batch, cap-notify, chghost, "
|
||||
"extended-join, invite-notify, message-tags, multi-prefix, "
|
||||
"server-time, setname, userhost-in-names.\n"
|
||||
"draft/multiline, extended-join, invite-notify, message-tags, "
|
||||
"multi-prefix, server-time, setname, userhost-in-names.\n"
|
||||
"\n"
|
||||
"The capabilities to automatically enable on servers can be set "
|
||||
"in option irc.server_default.capabilities (or by server in "
|
||||
|
||||
Reference in New Issue
Block a user