From: Bleep Date: Tue, 21 Mar 2000 00:33:29 +0000 (+0000) Subject: Author: Bleep X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;h=c6f463e89d3c49006457befa5c3fe774394c1044;p=ircu2.10.12-pk.git Author: Bleep Log message: Merge in changes from beta07, apply Maniac's squit token patch. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@40 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 3b9051f..97a6bf0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,12 @@ # # ChangeLog for ircu2.10.11 # -# $Id: ChangeLog,v 1.15 2000-03-19 05:49:04 bleep Exp $ +# $Id: ChangeLog,v 1.16 2000-03-21 00:33:29 bleep Exp $ # # Insert new changes at beginning of the change list. # #----------------------------------------------------------------------------- +* Add Maniacs squit patch --Bleep +* Merge in u2_10_10_beta07 changes --Bleep * Merge in u2_10_10_beta06 changes --Bleep * Start ircu2.10.11 development, beta branch u2_10_10 --Bleep diff --git a/ChangeLog.10 b/ChangeLog.10 index 70cd3b9..875ac08 100644 --- a/ChangeLog.10 +++ b/ChangeLog.10 @@ -1,10 +1,11 @@ # # ChangeLog for ircu2.10.10 # -# $Id: ChangeLog.10,v 1.2 2000-03-19 05:49:04 bleep Exp $ +# $Id: ChangeLog.10,v 1.3 2000-03-21 00:33:29 bleep Exp $ # # Insert new changes at beginning of the change list. # +* Remove add_local_domain entirely, unused --Bleep * Merge u2_10_10_beta06 create branch u2_10_10_beta07 --Bleep * Remove size_t from socket calls, audit usage of size_t values. --Bleep diff --git a/include/fda.h b/include/fda.h index 51022eb..379534e 100644 --- a/include/fda.h +++ b/include/fda.h @@ -15,6 +15,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id$ */ #ifndef INCLUDED_fda_h #define INCLUDED_fda_h diff --git a/include/res.h b/include/res.h index c9f52af..05c037b 100644 --- a/include/res.h +++ b/include/res.h @@ -47,15 +47,5 @@ extern int resolver_read(void); extern void resolver_read_multiple(int count); extern void flush_resolver_cache(void); -/* - * add_local_domain - append local domain suffix to hostnames that - * don't contain a dot '.' - * name - string to append to - * len - total length of the buffer - * name is modified only if there is enough space in the buffer to hold - * the suffix - */ -extern void add_local_domain(char* name, size_t len); - #endif /* INCLUDED_res_h */ diff --git a/ircd/chkconf.c b/ircd/chkconf.c index db8391f..edb4896 100644 --- a/ircd/chkconf.c +++ b/ircd/chkconf.c @@ -144,7 +144,7 @@ int main(int argc, char *argv[]) static struct ConfItem *chk_initconf(void) { FBFILE *file; - char line[512], *tmp, *s, *crule; + char line[512], *tmp, *crule; int ccount = 0, flags = 0; struct ConfItem *aconf = NULL, *ctop = NULL; @@ -180,34 +180,29 @@ static struct ConfItem *chk_initconf(void) /* * Do quoting of characters and # detection. */ - for (tmp = line; *tmp; tmp++) - { - if (*tmp == '\\') - { - switch (*(tmp + 1)) - { - case 'n': - *tmp = '\n'; - break; - case 'r': - *tmp = '\r'; - break; - case 't': - *tmp = '\t'; - break; - case '0': - *tmp = '\0'; - break; - default: - *tmp = *(tmp + 1); - break; + for (tmp = line; *tmp; ++tmp) { + if (*tmp == '\\') { + switch (*(tmp + 1)) { + case 'n': + *tmp = '\n'; + break; + case 'r': + *tmp = '\r'; + break; + case 't': + *tmp = '\t'; + break; + case '0': + *tmp = '\0'; + break; + default: + *tmp = *(tmp + 1); + break; } - if (!*(tmp + 1)) + if ('\0' == *(tmp + 1)) break; else - for (s = tmp; *s; *s = *++s) - ; - tmp++; + strcpy(tmp + 1, tmp + 2); } else if (*tmp == '#') *tmp = '\0'; diff --git a/ircd/res.c b/ircd/res.c index 2f824b2..755e897 100644 --- a/ircd/res.c +++ b/ircd/res.c @@ -369,27 +369,6 @@ void restart_resolver(void) start_resolver(); } -/* - * add_local_domain - Add the domain to hostname, if it is missing - * (as suggested by eps@TOASTER.SFSU.EDU) - */ -void add_local_domain(char* hname, unsigned int size) -{ - assert(0 != hname); - /* - * try to fix up unqualified names - */ - if ((_res.options & RES_DEFNAMES) && !strchr(hname, '.')) { - if (_res.defdname[0]) { - unsigned len = strlen(hname); - if ((strlen(_res.defdname) + len + 2) < size) { - hname[len++] = '.'; - strcpy(hname + len, _res.defdname); - } - } - } -} - /* * add_request - place a new request in the request list */ @@ -652,12 +631,6 @@ static void do_query_name(const struct DNSQuery* query, ircd_strncpy(hname, name, HOSTLEN); hname[HOSTLEN] = '\0'; -#if 0 - /* - * removed, this is incorrect for anything it's used for - */ - add_local_domain(hname, HOSTLEN); -#endif if (!request) { request = make_request(query); @@ -888,10 +861,6 @@ static int proc_answer(struct ResRequest* request, HEADER* header, /* * Wait to set request->type until we verify this structure */ -#if 0 - add_local_domain(hostbuf, HOSTLEN); -#endif - switch(type) { case T_A: /* diff --git a/ircd/s_misc.c b/ircd/s_misc.c index 9283f9c..4cb8272 100644 --- a/ircd/s_misc.c +++ b/ircd/s_misc.c @@ -323,7 +323,7 @@ int exit_client(struct Client *cptr, /* Connection being handled by && IsClient(victim)) /* Not a Ping struct or Log file */ { if (IsServer(victim) || IsHandshake(victim)) - sendto_one(victim, ":%s SQUIT %s 0 :%s", killer->name, me.name, comment); + sendto_one(victim, ":%s " TOK_SQUIT " %s 0 :%s", killer->name, me.name, comment); else if (!IsConnecting(victim)) { if (!IsDead(victim)) sendto_one(victim, "ERROR :Closing Link: %s by %s (%s)", @@ -392,7 +392,7 @@ int exit_client(struct Client *cptr, /* Connection being handled by for (dlp = me.serv->down; dlp; dlp = dlp->next) { if (dlp->value.cptr != killer->from && dlp->value.cptr != victim) { if (IsServer(victim)) - sendto_one(dlp->value.cptr, ":%s SQUIT %s " TIME_T_FMT " :%s", + sendto_one(dlp->value.cptr, ":%s " TOK_SQUIT " %s " TIME_T_FMT " :%s", killer->name, victim->name, victim->serv->timestamp, comment); else if (IsUser(victim) && 0 == (victim->flags & FLAGS_KILLED)) sendto_one(dlp->value.cptr, "%s%s " TOK_QUIT " :%s", NumNick(victim), comment);