1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 16:53:14 +02:00

Fixed display bugs with /kill command

This commit is contained in:
Sebastien Helleu
2006-02-21 10:23:35 +00:00
parent 13ddcc3adc
commit 349d9d1028
4 changed files with 50 additions and 16 deletions
+12 -7
View File
@@ -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;
+13 -1
View File
@@ -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;
}
+12 -7
View File
@@ -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;
+13 -1
View File
@@ -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;
}