summaryrefslogtreecommitdiff
path: root/src/irc/irc-send.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-05-24 21:39:39 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-05-24 21:39:39 +0000
commit1838637f24c2a1489ab7cbde7560eb6f316ace11 (patch)
treefdfd08ad045b79061006c3edab910f65c3df931a /src/irc/irc-send.c
parent6beb0f1cb0557d7b420626618b81dda323f6c437 (diff)
downloadweechat-1838637f24c2a1489ab7cbde7560eb6f316ace11.zip
Fixed /squery command (message sent to server, now ok with # args > 2)
Diffstat (limited to 'src/irc/irc-send.c')
-rw-r--r--src/irc/irc-send.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c
index b54346eb6..6aba63a95 100644
--- a/src/irc/irc-send.c
+++ b/src/irc/irc-send.c
@@ -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;
}