diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2003-11-02 23:00:34 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2003-11-02 23:00:34 +0000 |
commit | bde34ecd57550e6f6ff28f7ff7274ae966b357e5 (patch) | |
tree | 55910364f2fb5233f3d146ea980265f0401ea4b5 /src/irc/irc-recv.c | |
parent | f245ec3759d0929de0678233ad8acf25949a7bf1 (diff) | |
download | weechat-bde34ecd57550e6f6ff28f7ff7274ae966b357e5.zip |
Fixed bug on some IRC servers (when nick too long and nicklist problem)
Diffstat (limited to 'src/irc/irc-recv.c')
-rw-r--r-- | src/irc/irc-recv.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c index d5b2213e3..8e816a26f 100644 --- a/src/irc/irc-recv.c +++ b/src/irc/irc-recv.c @@ -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) { |