summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2004-10-24 19:27:02 +0000
committerSebastien Helleu <flashcode@flashtux.org>2004-10-24 19:27:02 +0000
commit022bf4d070be69b0c2a31b87d6d0f380c48a96bb (patch)
tree822ab7972d627565e4981739007fa118b2db6304 /src
parentd37ec4791c4e7620b5801fcd59fd65103745ed1f (diff)
downloadweechat-022bf4d070be69b0c2a31b87d6d0f380c48a96bb.zip
Fixed bug with /kick command (now ok with many words as reason)
Diffstat (limited to 'src')
-rw-r--r--src/irc/irc-send.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c
index 1db8219c7..c096b9224 100644
--- a/src/irc/irc-send.c
+++ b/src/irc/irc-send.c
@@ -352,15 +352,27 @@ irc_cmd_send_join (t_irc_server *server, char *arguments)
int
irc_cmd_send_kick (t_irc_server *server, char *arguments)
{
+ char *args, *pos;
+
if (string_is_channel (arguments))
server_sendf (server, "KICK %s\r\n", arguments);
else
{
if (BUFFER_IS_CHANNEL (gui_current_window->buffer))
{
- server_sendf (server,
- "KICK %s %s\r\n",
- CHANNEL(gui_current_window->buffer)->name, arguments);
+ args = strdup (arguments);
+ pos = strchr (args, ' ');
+ if (pos)
+ pos[0] = '\0';
+ if (pos)
+ server_sendf (server,
+ "KICK %s %s :%s\r\n",
+ CHANNEL(gui_current_window->buffer)->name, args, pos + 1);
+ else
+ server_sendf (server,
+ "KICK %s %s\r\n",
+ CHANNEL(gui_current_window->buffer)->name, args);
+ free (args);
}
else
{