Browse Source

* HUBS weren't setting encstatus early enough

svn: 986
Bryan Drewery 22 năm trước cách đây
mục cha
commit
9eb9843e25
2 tập tin đã thay đổi với 7 bổ sung3 xóa
  1. 2 1
      doc/UPDATES
  2. 5 2
      src/dcc.c

+ 2 - 1
doc/UPDATES

@@ -21,13 +21,14 @@ This is a summary of ChangeLog basically.
 17.Cmds: voice, devoice, op, deop, invite, mop, kick, kickban now check if the user 
    issuing the cmd has access for the channel.
 18.cmd_getkey now recognizes +private.
-19.Limits were not being set.
+19.Resource limits were not being set.
 20.No longer chmodding on CYGWIN
 21.The AES core should be slightly faster now.
 22.Added channel flag +autoop (+o users only, +private accounted for). (+y bots op)
 23.Added user flag for autoop (+O). (+y bots op)
 24.Fixed a problem with my chmod() function.
 25.Fixed many various somewhat random bugs.
+26.Hubs weren't setting their link socket to encrypt early enough.
 
 1.1.5
 

+ 5 - 2
src/dcc.c

@@ -1533,6 +1533,10 @@ static void dcc_telnet_id(int idx, char *buf, int atr)
   correct_handle(buf);
   strcpy(dcc[idx].nick, buf);
   if (glob_bot(fr)) {
+    /* the leaf bot set encstatus right after it sent it's nick, so the hub must now as well. */
+    socklist[snum].encstatus = 1;
+    socklist[snum].gz = 1;
+
     if (!egg_strcasecmp(conf.bot->nick, dcc[idx].nick)) {
       dprintf(idx, "error You cannot link using my nick.\n");
       putlog(LOG_BOTS, "*", DCC_MYBOTNETNICK, dcc[idx].host);
@@ -1629,8 +1633,7 @@ static void dcc_telnet_pass(int idx, int atr)
       socklist[snum].iseed = socklist[snum].oseed;
       tmp2 = encrypt_string(SALT2, initkey);
       putlog(LOG_BOTS, "*", "Sending encrypted link handshake to %s...", dcc[idx].nick);
-      socklist[snum].encstatus = 1;
-      socklist[snum].gz = 1;
+
       dprintf(idx, "elink %s %d\n", tmp2, socklist[snum].oseed);
       free(tmp2);
       strcpy(socklist[snum].okey, initkey);