1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 05:46:38 +02:00

Fixed bug on some IRC servers (when nick too long and nicklist problem)

This commit is contained in:
Sebastien Helleu
2003-11-02 23:00:34 +00:00
parent f245ec3759
commit bde34ecd57
2 changed files with 46 additions and 2 deletions
+23 -1
View File
@@ -1158,9 +1158,19 @@ irc_cmd_recv_topic (t_irc_server *server, char *host, char *arguments)
int
irc_cmd_recv_004 (t_irc_server *server, char *host, char *arguments)
{
char *pos;
/* make gcc happy */
(void) host;
(void) arguments;
pos = strchr (arguments, ' ');
if (pos)
pos[0] = '\0';
if (strcmp (server->nick, arguments) != 0)
{
free (server->nick);
server->nick = strdup (arguments);
}
irc_cmd_recv_server_msg (server, host, arguments);
@@ -2222,6 +2232,18 @@ irc_cmd_recv_353 (t_irc_server *server, char *host, char *arguments)
pos = strstr (arguments, " = ");
if (pos)
arguments = pos + 3;
else
{
pos = strstr (arguments, " * ");
if (pos)
arguments = pos + 3;
else
{
pos = strstr (arguments, " @ ");
if (pos)
arguments = pos + 3;
}
}
pos = strchr (arguments, ' ');
if (pos)
{
+23 -1
View File
@@ -1158,9 +1158,19 @@ irc_cmd_recv_topic (t_irc_server *server, char *host, char *arguments)
int
irc_cmd_recv_004 (t_irc_server *server, char *host, char *arguments)
{
char *pos;
/* make gcc happy */
(void) host;
(void) arguments;
pos = strchr (arguments, ' ');
if (pos)
pos[0] = '\0';
if (strcmp (server->nick, arguments) != 0)
{
free (server->nick);
server->nick = strdup (arguments);
}
irc_cmd_recv_server_msg (server, host, arguments);
@@ -2222,6 +2232,18 @@ irc_cmd_recv_353 (t_irc_server *server, char *host, char *arguments)
pos = strstr (arguments, " = ");
if (pos)
arguments = pos + 3;
else
{
pos = strstr (arguments, " * ");
if (pos)
arguments = pos + 3;
else
{
pos = strstr (arguments, " @ ");
if (pos)
arguments = pos + 3;
}
}
pos = strchr (arguments, ' ');
if (pos)
{