summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-12-04 11:39:31 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-12-04 11:39:31 +0000
commit27f54e286f2b5a1dadca14620a690df03eade5fa (patch)
tree1e6186d8b4942f9e79b4e83dc2a81f15743be024 /src
parent45f86f7b5fc43b3efe5f3426312e5b9bb2288eb4 (diff)
downloadirssi-27f54e286f2b5a1dadca14620a690df03eade5fa.zip
Added no_connect to SERVER_CONNECT_REC, also exported a few other variables
to perl. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3042 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/core/server-connect-rec.h1
-rw-r--r--src/core/servers.c3
-rw-r--r--src/perl/perl-common.c7
3 files changed, 11 insertions, 0 deletions
diff --git a/src/core/server-connect-rec.h b/src/core/server-connect-rec.h
index ce1e48a4..8ef2d0ad 100644
--- a/src/core/server-connect-rec.h
+++ b/src/core/server-connect-rec.h
@@ -30,5 +30,6 @@ unsigned int reconnection:1; /* we're trying to reconnect */
unsigned int no_autojoin_channels:1; /* don't autojoin any channels */
unsigned int unix_socket:1; /* Connect using named unix socket */
unsigned int use_ssl:1; /* this connection uses SSL */
+unsigned int no_connect:1; /* don't connect() at all, it's done by plugin */
char *channels;
char *away_reason;
diff --git a/src/core/servers.c b/src/core/servers.c
index f9ab791a..ad48b2e8 100644
--- a/src/core/servers.c
+++ b/src/core/servers.c
@@ -178,6 +178,9 @@ static void server_real_connect(SERVER_REC *server, IPADDR *ip,
signal_emit("server connecting", 2, server, ip);
+ if (server->connrec->no_connect)
+ return;
+
if (ip != NULL) {
own_ip = ip == NULL ? NULL :
(IPADDR_IS_V6(ip) ? server->connrec->own_ip6 :
diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c
index f7cd87da..fb6d3531 100644
--- a/src/perl/perl-common.c
+++ b/src/perl/perl-common.c
@@ -265,6 +265,7 @@ void perl_connect_fill_hash(HV *hv, SERVER_CONNECT_REC *conn)
hv_store(hv, "type", 4, new_pv(type), 0);
hv_store(hv, "chat_type", 9, new_pv(chat_type), 0);
+ hv_store(hv, "tag", 3, new_pv(conn->tag), 0);
hv_store(hv, "address", 7, new_pv(conn->address), 0);
hv_store(hv, "port", 4, newSViv(conn->port), 0);
hv_store(hv, "chatnet", 7, new_pv(conn->chatnet), 0);
@@ -273,6 +274,12 @@ void perl_connect_fill_hash(HV *hv, SERVER_CONNECT_REC *conn)
hv_store(hv, "wanted_nick", 11, new_pv(conn->nick), 0);
hv_store(hv, "username", 8, new_pv(conn->username), 0);
hv_store(hv, "realname", 8, new_pv(conn->realname), 0);
+
+ hv_store(hv, "reconnection", 12, newSViv(conn->reconnection), 0);
+ hv_store(hv, "no_autojoin_channels", 20, newSViv(conn->no_autojoin_channels), 0);
+ hv_store(hv, "unix_socket", 11, newSViv(conn->unix_socket), 0);
+ hv_store(hv, "use_ssl", 7, newSViv(conn->use_ssl), 0);
+ hv_store(hv, "no_connect", 10, newSViv(conn->no_connect), 0);
}
void perl_server_fill_hash(HV *hv, SERVER_REC *server)