Author: Bleep <tomh@inxpress.net>
authorBleep <twhelvey1@home.com>
Tue, 21 Mar 2000 00:33:29 +0000 (00:33 +0000)
committerBleep <twhelvey1@home.com>
Tue, 21 Mar 2000 00:33:29 +0000 (00:33 +0000)
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

ChangeLog
ChangeLog.10
include/fda.h
include/res.h
ircd/chkconf.c
ircd/res.c
ircd/s_misc.c

index 3b9051f08d8ee4f6cb7e93651cc66bc84807df2c..97a6bf0ff570de8e9c93aa0175bacb2f835e75e6 100644 (file)
--- 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
index 70cd3b9d61ad1234e3e3070569010616a21e5687..875ac0845c846383e3d04a5c73374ac2fcd6c34d 100644 (file)
@@ -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
index 51022ebe7658ac62db6d9fe5e4976d54625994da..379534e9cc9354687fd5b293ee360d1cb4a85ba9 100644 (file)
@@ -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
index c9f52af1f63671446a384203c9939bcbd14d7393..05c037ba5f40df1025d067b1bcae40ce2c71e423 100644 (file)
@@ -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 */
 
index db8391fa1fff1e96fa7f579dec290595a6a62c82..edb489644db4077ad3a9b786dc763e958c5b50a8 100644 (file)
@@ -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';
index 2f824b2db8bb4a8ce54eab7728b0c707656bd7fc..755e897f8980fd0c4c69312dec7c1c9fc2ec656f 100644 (file)
@@ -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:
       /*
index 9283f9c35c0f25fe33166e804bf4442361929072..4cb82723d4f1c5ac2ef781c69a2f44c7d457c227 100644 (file)
@@ -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);