[cvslog] [CVS] Module eggdrop1.8: Change committed

cvs at eggheads.org cvs at eggheads.org
Thu Nov 18 06:54:49 CST 2010


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.8
Commit time: 2010-11-18 12:54:49 UTC
Committer  : Rumen Stoyanov <pseudo at egg6.net>

Modified files:
     THANKS doc/Changes1.8 src/net.c src/mod/server.mod/servmsg.c

Log message:

Fixed a problem with resolving hostnames when compiled with IPv6 disabled.
Made server.mod report connection failures properly.

---------------------- diff included ----------------------
Index: eggdrop1.8/THANKS
diff -u eggdrop1.8/THANKS:1.8 eggdrop1.8/THANKS:1.9
--- eggdrop1.8/THANKS:1.8	Fri Nov  5 10:18:01 2010
+++ eggdrop1.8/THANKS	Thu Nov 18 06:54:39 2010
@@ -1,4 +1,4 @@
-$Id: THANKS,v 1.8 2010/11/05 16:18:01 pseudo Exp $:
+$Id: THANKS,v 1.9 2010/11/18 12:54:39 pseudo Exp $:
 
 Eggdrop Developers and Contributors
 Last revised: October 25, 2010
@@ -88,6 +88,7 @@
 archimede
 archon
 argg           Paul Anderson                   xerox at foonet.net
+Arkadietz      Kiril Georgiev                  arkadietz at yahoo.com
 Armand                                         udf-xerxes at barrysworld.com
 axel_v
 aXs
Index: eggdrop1.8/doc/Changes1.8
diff -u eggdrop1.8/doc/Changes1.8:1.36 eggdrop1.8/doc/Changes1.8:1.37
--- eggdrop1.8/doc/Changes1.8:1.36	Fri Nov  5 10:18:01 2010
+++ eggdrop1.8/doc/Changes1.8	Thu Nov 18 06:54:39 2010
@@ -1,4 +1,4 @@
-$Id: Changes1.8,v 1.36 2010/11/05 16:18:01 pseudo Exp $
+$Id: Changes1.8,v 1.37 2010/11/18 12:54:39 pseudo Exp $
 
 Eggdrop Changes (since version 1.8.0)
 
@@ -6,6 +6,10 @@
 
 1.8.0 (CVS):
 
+  - Fixed a problem with resolving hostnames when compiled with IPv6 disabled.
+  - Made server.mod report connection failures properly.
+    Found by: Arkadietz / Patch by: pseudo
+
   - Fixed getudef() to return intptr_t instead of int to prevent crashes on
     64-bit systems.
     Found by: izy` / Patch by: pseudo
Index: eggdrop1.8/src/mod/server.mod/servmsg.c
diff -u eggdrop1.8/src/mod/server.mod/servmsg.c:1.4 eggdrop1.8/src/mod/server.mod/servmsg.c:1.5
--- eggdrop1.8/src/mod/server.mod/servmsg.c:1.4	Sun Oct 24 07:22:40 2010
+++ eggdrop1.8/src/mod/server.mod/servmsg.c	Thu Nov 18 06:54:39 2010
@@ -1,7 +1,7 @@
 /*
  * servmsg.c -- part of server.mod
  *
- * $Id: servmsg.c,v 1.4 2010/10/24 13:22:40 pseudo Exp $
+ * $Id: servmsg.c,v 1.5 2010/11/18 12:54:39 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1317,36 +1317,36 @@
   dcc[servidx].sock = getsock(dcc[servidx].sockname.family, 0);
   setsnport(dcc[servidx].sockname, dcc[servidx].port);
   serv = open_telnet_raw(dcc[servidx].sock, &dcc[servidx].sockname);
-#ifdef TLS
-  if (serv < 0 || (dcc[servidx].ssl &&
-      ssl_handshake(serv, TLS_CONNECT, tls_vfyserver, LOG_SERV,
-                    dcc[servidx].host, NULL))) {
-    putlog(LOG_SERV, "*", "%s %s (%s)", IRC_FAILEDCONNECT, dcc[servidx].host,
-           serv ? "TLS negotiation failure" : strerror(errno));
-#else
   if (serv < 0) {
     putlog(LOG_SERV, "*", "%s %s (%s)", IRC_FAILEDCONNECT, dcc[servidx].host,
            strerror(errno));
-#endif
     lostdcc(servidx);
-  } else {
-    dcc[servidx].sock = serv;
-    /* Queue standard login */
-    dcc[servidx].timeval = now;
-    SERVER_SOCKET.timeout_val = &server_timeout;
-    /* Another server may have truncated it, so use the original */
-    strcpy(botname, origbotname);
-    /* Start alternate nicks from the beginning */
-    altnick_char = 0;
-    if (pass[0])
-      dprintf(DP_MODE, "PASS %s\n", pass);
-    dprintf(DP_MODE, "NICK %s\n", botname);
-
-    rmspace(botrealname);
-    if (botrealname[0] == 0)
-      strcpy(botrealname, "/msg LamestBot hello");
-    dprintf(DP_MODE, "USER %s . . :%s\n", botuser, botrealname);
-
-    /* Wait for async result now. */
+    return;
   }
+#ifdef TLS
+  if (dcc[servidx].ssl && ssl_handshake(serv, TLS_CONNECT, tls_vfyserver,
+                                        LOG_SERV, dcc[servidx].host, NULL)) {
+    putlog(LOG_SERV, "*", "%s %s (%s)", IRC_FAILEDCONNECT, dcc[servidx].host,
+           "TLS negotiation failure");
+    lostdcc(servidx);
+    return;
+  }
+#endif
+  /* Queue standard login */
+  dcc[servidx].timeval = now;
+  SERVER_SOCKET.timeout_val = &server_timeout;
+  /* Another server may have truncated it, so use the original */
+  strcpy(botname, origbotname);
+  /* Start alternate nicks from the beginning */
+  altnick_char = 0;
+  if (pass[0])
+    dprintf(DP_MODE, "PASS %s\n", pass);
+  dprintf(DP_MODE, "NICK %s\n", botname);
+
+  rmspace(botrealname);
+  if (botrealname[0] == 0)
+    strcpy(botrealname, "/msg LamestBot hello");
+  dprintf(DP_MODE, "USER %s . . :%s\n", botuser, botrealname);
+
+  /* Wait for async result now. */
 }
Index: eggdrop1.8/src/net.c
diff -u eggdrop1.8/src/net.c:1.6 eggdrop1.8/src/net.c:1.7
--- eggdrop1.8/src/net.c:1.6	Wed Oct 20 07:07:13 2010
+++ eggdrop1.8/src/net.c	Thu Nov 18 06:54:39 2010
@@ -2,7 +2,7 @@
  * net.c -- handles:
  *   all raw network i/o
  *
- * $Id: net.c,v 1.6 2010/10/20 13:07:13 pseudo Exp $
+ * $Id: net.c,v 1.7 2010/11/18 12:54:39 pseudo Exp $
  */
 /*
  * This is hereby released into the public domain.
@@ -205,8 +205,7 @@
       egg_memcpy(&addr->addr.s4.sin_addr, hp->h_addr, hp->h_length);
       af = hp->h_addrtype;
     }
-  } else
-    af = AF_INET;
+  }
   
   addr->family = addr->addr.s4.sin_family = AF_INET;
   addr->addr.sa.sa_family = addr->family;
----------------------- End of diff -----------------------


More information about the Changes mailing list