summaryrefslogtreecommitdiff
path: root/src/irc/irc-send.c
diff options
context:
space:
mode:
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;
}