diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-02-21 10:23:35 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-02-21 10:23:35 +0000 |
commit | 349d9d1028c000415b57a50eb717dde410344a1a (patch) | |
tree | 9b65b0f42114d34c709f63fa3c92f9722e3a6756 /src/irc | |
parent | 13ddcc3adc9ac48a00cd7aeb8f4bd5eea24126d8 (diff) | |
download | weechat-349d9d1028c000415b57a50eb717dde410344a1a.zip |
Fixed display bugs with /kill command
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/irc-recv.c | 19 | ||||
-rw-r--r-- | src/irc/irc-send.c | 14 |
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; } |