1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 10:43:13 +02:00

Fixed /squery command (message sent to server, now ok with # args > 2)

This commit is contained in:
Sebastien Helleu
2006-05-24 21:39:39 +00:00
parent 6beb0f1cb0
commit 1838637f24
6 changed files with 38 additions and 6 deletions
+2 -1
View File
@@ -1,9 +1,10 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2006-05-21
ChangeLog - 2006-05-24
Version 0.1.9 (under dev!):
* fixed /squery command (message sent to server, now ok with # args > 2)
* fixed /alias command (with an alias name, display content)
* improved lua plugin detection (bug #16574)
* added backtrace when WeeChat crashes, log file automatically renamed
+1 -1
View File
@@ -233,7 +233,7 @@ t_irc_command irc_commands[] =
{ "squery", N_("deliver a message to a service"),
N_("service text"),
N_("service: name of service\ntext: text to send"),
NULL, 2, 2, 1, 1, NULL, irc_cmd_send_squery, NULL },
NULL, 2, MAX_ARGS, 1, 1, NULL, irc_cmd_send_squery, NULL },
{ "squit", N_("disconnect server links"),
N_("server comment"),
N_( "server: server name\n"
+16 -1
View File
@@ -1807,10 +1807,25 @@ int
irc_cmd_send_squery (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
char *pos;
/* make gcc happy */
(void) channel;
pos = strchr (arguments, ' ');
if (pos)
{
pos[0] = '\0';
pos++;
while (pos[0] == ' ')
{
pos++;
}
server_sendf (server, "SQUERY %s :%s\r\n", arguments, pos);
}
else
server_sendf (server, "SQUERY %s\r\n", arguments);
server_sendf (server, "SQUERY %s\r\n", arguments);
return 0;
}
+2 -1
View File
@@ -1,9 +1,10 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2006-05-21
ChangeLog - 2006-05-24
Version 0.1.9 (under dev!):
* fixed /squery command (message sent to server, now ok with # args > 2)
* fixed /alias command (with an alias name, display content)
* improved lua plugin detection (bug #16574)
* added backtrace when WeeChat crashes, log file automatically renamed
+1 -1
View File
@@ -233,7 +233,7 @@ t_irc_command irc_commands[] =
{ "squery", N_("deliver a message to a service"),
N_("service text"),
N_("service: name of service\ntext: text to send"),
NULL, 2, 2, 1, 1, NULL, irc_cmd_send_squery, NULL },
NULL, 2, MAX_ARGS, 1, 1, NULL, irc_cmd_send_squery, NULL },
{ "squit", N_("disconnect server links"),
N_("server comment"),
N_( "server: server name\n"
+16 -1
View File
@@ -1807,10 +1807,25 @@ int
irc_cmd_send_squery (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
char *pos;
/* make gcc happy */
(void) channel;
pos = strchr (arguments, ' ');
if (pos)
{
pos[0] = '\0';
pos++;
while (pos[0] == ' ')
{
pos++;
}
server_sendf (server, "SQUERY %s :%s\r\n", arguments, pos);
}
else
server_sendf (server, "SQUERY %s\r\n", arguments);
server_sendf (server, "SQUERY %s\r\n", arguments);
return 0;
}