From 5670830e9e99417d14707636be4db700e890333f Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Thu, 16 Dec 2004 03:33:57 +0000 Subject: [PATCH] Miscellaneous bugfixes from recent commits, and a file omitted from last commit. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1275 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 10 ++++++++++ doc/example.conf | 11 ----------- ircd/ircd_res.c | 2 +- ircd/m_server.c | 2 +- ircd/numnicks.c | 5 ++++- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index b8c4394..6c3fcc7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-12-15 Michael Poole + + * doc/example.conf: Remove the example Server blocks since they + are no longer used (were merged into Connect). + + * ircd/ircd_res.c (restart_resolver): Fix typo in previous commit. + + * ircd/m_server.c (check_loop_and_lh): Use a different argument to + test whether an introduced server is directly connected or not. + 2004-12-14 Michael Poole * include/client.h (FLAG_IPV6): New value for enum Flag. diff --git a/doc/example.conf b/doc/example.conf index b0b10f8..c652d17 100644 --- a/doc/example.conf +++ b/doc/example.conf @@ -436,17 +436,6 @@ UWorld { UWorld { name = "channels6.undernet.org"; }; -Server { - name = "Amsterdam.NL.Eu.UnderNet.org"; - mask = "*"; - hub = yes; -}; -# An example just to make sure IRCnet doesn't get on undernet... -Server { - name = "*"; - mask = "eris.berkeley.edu"; - hub = yes; -}; # As of ircu2.10.05 is it possible to Jupe nicks. As per CFV-0095, the # following nicks must be juped, it is not allowed to jupe others as well. diff --git a/ircd/ircd_res.c b/ircd/ircd_res.c index a376549..0ce4fd6 100644 --- a/ircd/ircd_res.c +++ b/ircd/ircd_res.c @@ -175,7 +175,7 @@ restart_resolver(void) { struct irc_sockaddr *local; int fd; - local = irc_in_addr_valid(&ResolverAddr) ? &ResolverAddr : &VirtualHost; + local = irc_in_addr_valid(&ResolverAddr.addr) ? &ResolverAddr : &VirtualHost; fd = os_socket(local, SOCK_DGRAM, "Resolver UDP socket"); if (fd < 0) return; if (!socket_add(&res_socket, res_readreply, NULL, SS_DATAGRAM, diff --git a/ircd/m_server.c b/ircd/m_server.c index af7a010..6efe6bd 100644 --- a/ircd/m_server.c +++ b/ircd/m_server.c @@ -125,7 +125,7 @@ check_loop_and_lh(struct Client* cptr, struct Client *sptr, time_t *ghost, const */ lhconf = find_conf_byname(cli_confs(cptr), cli_name(cptr), CONF_SERVER); assert(lhconf != NULL); - if (cptr == sptr) + if (ghost) { if (!feature_bool(FEAT_HUB)) for (ii = 0; ii <= HighestFd; ii++) diff --git a/ircd/numnicks.c b/ircd/numnicks.c index 931c1ca..1e41917 100644 --- a/ircd/numnicks.c +++ b/ircd/numnicks.c @@ -440,11 +440,14 @@ struct Client* find_match_server(char *mask) * @param[in] addr IP address to encode. * @param[in] count Number of bytes writable to \a buf. */ -const char* iptobase64(char* buf, const struct irc_in_addr* addr, unsigned int count) +const char* iptobase64(char* buf, const struct irc_in_addr* addr, unsigned int count, int v6_ok) { if (irc_in_addr_is_ipv4(addr)) { assert(count >= 6); inttobase64(buf, (htons(addr->in6_16[6]) << 16) | htons(addr->in6_16[7]), 6); + } else if (!v6_ok) { + assert(count >= 6); + strcpy(buf, "AAAAAA"); } else { unsigned int max_start, max_zeros, curr_zeros, zero, ii; char *output = buf; -- 2.20.1