From 46a6cf58f3e883b4730067ebc85e2a25f806c1ba Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 23 Jan 2002 00:23:31 +0000 Subject: [PATCH] Don't send proxy commands to server if -noproxy option was used. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2341 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/irc-servers.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 4da561eb..a8ebb607 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -106,10 +106,11 @@ static void server_init(IRC_SERVER_REC *server) conn = server->connrec; - if (conn->proxy_password != NULL && *conn->proxy_password != '\0') + if (conn->proxy != NULL && conn->proxy_password != NULL && + *conn->proxy_password != '\0') irc_send_cmdv(server, "PASS %s", conn->proxy_password); - if (conn->proxy_string != NULL) + if (conn->proxy != NULL && conn->proxy_string != NULL) irc_send_cmdv(server, conn->proxy_string, conn->address, conn->port); if (conn->password != NULL && *conn->password != '\0') { @@ -151,7 +152,7 @@ static void server_init(IRC_SERVER_REC *server) server->cmdcount = 0; - if (conn->proxy_string_after != NULL) { + if (conn->proxy != NULL && conn->proxy_string_after != NULL) { irc_send_cmdv(server, conn->proxy_string_after, conn->address, conn->port); }