Przeglądaj źródła

* Update.mod cosmetic changes

svn: 418
Bryan Drewery 22 lat temu
rodzic
commit
84c1e9082a
3 zmienionych plików z 5 dodań i 1 usunięć
  1. 2 0
      src/chanprog.c
  2. 1 0
      src/misc.c
  3. 2 1
      src/mod/update.mod/update.c

+ 2 - 0
src/chanprog.c

@@ -318,6 +318,8 @@ void tell_verbose_status(int idx)
   dprintf(idx, "I am %s, running %s:  %d user%s (mem: %uk)\n",
 	  botnetnick, ver, i, i == 1 ? "" : "s",
           (int) (expected_memory() / 1024));
+  if (isupdatehub())
+    dprintf(idx, "I am an update hub.\n");
 #endif /* HUB */
   now2 = now - online_since;
   s[0] = 0;

+ 1 - 0
src/misc.c

@@ -1407,6 +1407,7 @@ int updatebin (int idx, char *par, int autoi)
     unlink(pid_file); //delete pid so new binary doesnt exit.
 #ifdef HUB
   listen_all(my_port, 1); //close the listening port...
+  usleep(5000);
 #endif /* HUB */
   i = system(buf);
   if (i == -1 || i == 1) {

+ 2 - 1
src/mod/update.mod/update.c

@@ -134,6 +134,7 @@ static void update_version(int idx, char *par)
 
   dcc[idx].status &= ~(STAT_GETTINGU | STAT_SENDINGU | STAT_OFFEREDU);
   if ((dcc[idx].u.bot->bts < buildts) && (isupdatehub())) {
+    putlog(LOG_DEBUG, "?", "Asking %s to accept update from me", dcc[idx].nick);
     dprintf(idx, "sb u?\n");
     dcc[idx].status |= STAT_OFFEREDU;
   }
@@ -297,7 +298,7 @@ static void start_sending_binary(int idx)
 
   dcc[idx].status |= STAT_SENDINGU;
 
-  putlog(LOG_BOTS, "*", "Sending binary send request to %s",dcc[idx].nick);
+  putlog(LOG_BOTS, "*", "Sending binary send request to %s", dcc[idx].nick);
   if (!strcmp("*", dcc[idx].u.bot->sysname)) {
     putlog(LOG_MISC, "*", "Cannot update \002%s\002 automatically, uname not returning os name.", dcc[idx].nick);
     return;