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:
+12
-7
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user