From 88a4177e285d65affeb2c2b97e308449a2c0cd4c Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 24 May 2005 04:05:14 +0000 Subject: Nonblocking connect() for outbound server links (why was this blocking anyway) Changed /map to show authenticating servers with a * similar to hybrid git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1485 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 712e26f5e..577741377 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -124,6 +124,7 @@ typedef nspace::hash_map, irc::StrHa typedef nspace::hash_map, irc::InAddr_HashComp> address_cache; typedef nspace::hash_map, irc::StrHashComp> whowas_hash; typedef std::deque command_table; +typedef std::map autoconnects; // This table references users by file descriptor. // its an array to make it VERY fast, as all lookups are referenced @@ -140,6 +141,7 @@ user_hash clientlist; chan_hash chanlist; whowas_hash whowas; command_table cmdlist; +autoconnects autoconns; file_cache MOTD; file_cache RULES; address_cache IP; @@ -398,6 +400,19 @@ void ReadConfig(bool bail, userrec* user) read_xline_defaults(); log(DEFAULT,"Applying K lines, Q lines and Z lines..."); apply_lines(); + + for (int i = 0; i < ConfValueEnum("link",&config_f); i++) + { + char Link_ServerName[MAXBUF],Link_AConn[MAXBUF]; + ConfValue("link","name",i,Link_ServerName,&config_f); + ConfValue("link","autoconnect",i,Link_AConn,&config_f); + if (strcmp(Link_AConn,"")) + { + autoconns[std::string(Link_ServerName)] = atoi(Link_AConn) + time(NULL); + } + } + + log(DEFAULT,"Done reading configuration file, InspIRCd is now starting."); if (!bail) { -- cgit v1.3.1-10-gc9f91