1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

added /SET proxy_password

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1414 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-03-20 23:24:45 +00:00 committed by cras
parent 27d7eaa3bf
commit ae6d2014e5
5 changed files with 8 additions and 1 deletions

View File

@ -6,7 +6,7 @@ int chat_type; /* chat_protocol_lookup(xx) */
/* if we're connecting via proxy, or just NULLs */ /* if we're connecting via proxy, or just NULLs */
char *proxy; char *proxy;
int proxy_port; int proxy_port;
char *proxy_string; char *proxy_string, *proxy_password;
unsigned short family; /* 0 = don't care, AF_INET or AF_INET6 */ unsigned short family; /* 0 = don't care, AF_INET or AF_INET6 */
char *address; char *address;

View File

@ -131,6 +131,7 @@ server_connect_copy_skeleton(SERVER_CONNECT_REC *src, int connect_info)
dest->proxy = g_strdup(src->proxy); dest->proxy = g_strdup(src->proxy);
dest->proxy_port = src->proxy_port; dest->proxy_port = src->proxy_port;
dest->proxy_string = g_strdup(src->proxy_string); dest->proxy_string = g_strdup(src->proxy_string);
dest->proxy_password = g_strdup(src->proxy_password);
if (connect_info) { if (connect_info) {
dest->family = src->family; dest->family = src->family;

View File

@ -131,6 +131,7 @@ static void server_setup_fill(SERVER_CONNECT_REC *conn,
conn->proxy = g_strdup(settings_get_str("proxy_address")); conn->proxy = g_strdup(settings_get_str("proxy_address"));
conn->proxy_port = settings_get_int("proxy_port"); conn->proxy_port = settings_get_int("proxy_port");
conn->proxy_string = g_strdup(settings_get_str("proxy_string")); conn->proxy_string = g_strdup(settings_get_str("proxy_string"));
conn->proxy_password = g_strdup(settings_get_str("proxy_password"));
} }
/* source IP */ /* source IP */
@ -502,6 +503,7 @@ void servers_setup_init(void)
settings_add_str("proxy", "proxy_address", ""); settings_add_str("proxy", "proxy_address", "");
settings_add_int("proxy", "proxy_port", 6667); settings_add_int("proxy", "proxy_port", 6667);
settings_add_str("proxy", "proxy_string", "CONNECT %s %d"); settings_add_str("proxy", "proxy_string", "CONNECT %s %d");
settings_add_str("proxy", "proxy_password", "");
setupservers = NULL; setupservers = NULL;
source_host_ip4 = source_host_ip6 = NULL; source_host_ip4 = source_host_ip6 = NULL;

View File

@ -408,6 +408,7 @@ void server_connect_free(SERVER_CONNECT_REC *conn)
signal_emit("server connect free", 1, conn); signal_emit("server connect free", 1, conn);
g_free_not_null(conn->proxy); g_free_not_null(conn->proxy);
g_free_not_null(conn->proxy_string); g_free_not_null(conn->proxy_string);
g_free_not_null(conn->proxy_password);
g_free_not_null(conn->address); g_free_not_null(conn->address);
g_free_not_null(conn->chatnet); g_free_not_null(conn->chatnet);

View File

@ -109,6 +109,9 @@ static void server_init(IRC_SERVER_REC *server)
conn = server->connrec; conn = server->connrec;
if (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_string != NULL)
irc_send_cmdv(server, conn->proxy_string, conn->address, conn->port); irc_send_cmdv(server, conn->proxy_string, conn->address, conn->port);