summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/irc-recv.c19
-rw-r--r--src/irc/irc-send.c14
2 files changed, 25 insertions, 8 deletions
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index 1558935ad..e74bdcdb3 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -539,15 +539,20 @@ irc_cmd_recv_kill (t_irc_server *server, char *host, char *nick, char *arguments
while (pos_host2[0] == ' ')
pos_host2++;
- pos_comment = strchr (pos_host2, ' ');
- if (pos_comment)
+ if (pos_host2[0] == ':')
+ pos_comment = pos_host2 + 1;
+ else
{
- pos_comment[0] = '\0';
- pos_comment++;
- while (pos_comment[0] == ' ')
- pos_comment++;
- if (pos_comment[0] == ':')
+ pos_comment = strchr (pos_host2, ' ');
+ if (pos_comment)
+ {
+ pos_comment[0] = '\0';
pos_comment++;
+ while (pos_comment[0] == ' ')
+ pos_comment++;
+ if (pos_comment[0] == ':')
+ pos_comment++;
+ }
}
for (ptr_channel = server->channels; ptr_channel;
diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c
index 9cf873106..81890211e 100644
--- a/src/irc/irc-send.c
+++ b/src/irc/irc-send.c
@@ -961,10 +961,22 @@ int
irc_cmd_send_kill (t_irc_server *server, t_irc_channel *channel,
char *arguments)
{
+ char *pos;
+
/* make gcc happy */
(void) channel;
- server_sendf (server, "KILL %s\r\n", arguments);
+ pos = strchr (arguments, ' ');
+ if (pos)
+ {
+ pos[0] = '\0';
+ pos++;
+ while (pos[0] == ' ')
+ pos++;
+ server_sendf (server, "KILL %s :%s\r\n", arguments, pos);
+ }
+ else
+ server_sendf (server, "KILL %s\r\n", arguments);
return 0;
}