diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-07-11 12:14:57 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-07-11 12:14:57 +0000 |
commit | 673e7680af503c5d6d0d03fb8e1c339a3cd0c3eb (patch) | |
tree | b5758f0b5ff893ac51cda8c36c8ca5190172438d /src | |
parent | ad1120c84c0ef1dce5299551237bfca3939e5dbf (diff) | |
download | weechat-673e7680af503c5d6d0d03fb8e1c339a3cd0c3eb.zip |
Fixed bug with IRC URL on command line (irc://)
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/irc-server.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/irc/irc-server.c b/src/irc/irc-server.c index b917b4ca0..b2922018a 100644 --- a/src/irc/irc-server.c +++ b/src/irc/irc-server.c @@ -150,7 +150,7 @@ server_init_with_url (char *irc_url, t_irc_server *server) else return -1; - url = strdup (irc_url); + url = strdup (pos); pos_server = strchr (url, '@'); if (pos_server) { @@ -161,13 +161,13 @@ server_init_with_url (char *irc_url, t_irc_server *server) free (url); return -1; } - pos2 = strchr (pos, ':'); + pos2 = strchr (url, ':'); if (pos2) { pos2[0] = '\0'; server->password = strdup (pos2 + 1); } - server->nick1 = strdup (pos); + server->nick1 = strdup (url); } else { @@ -182,7 +182,7 @@ server_init_with_url (char *irc_url, t_irc_server *server) free (url); return -1; } - pos_server = url + 6; + pos_server = url; } if (!pos_server[0]) { |