Bläddra i källkod

* Sync localhub userlist changes back to hub after link

Bryan Drewery 16 år sedan
förälder
incheckning
69e8c5e71c
1 ändrade filer med 6 tillägg och 0 borttagningar
  1. 6 0
      src/mod/share.mod/share.c

+ 6 - 0
src/mod/share.mod/share.c

@@ -1059,6 +1059,8 @@ static void
 share_endstartup(int idx, char *par)
 share_endstartup(int idx, char *par)
 {
 {
   dcc[idx].status &= ~STAT_GETTING;
   dcc[idx].status &= ~STAT_GETTING;
+  // Share any local changes out
+  dump_resync(idx);
   /* Send to any other sharebots */
   /* Send to any other sharebots */
   if (conf.bot->hub || conf.bot->localhub)
   if (conf.bot->hub || conf.bot->localhub)
     hook_read_userfile();
     hook_read_userfile();
@@ -1088,6 +1090,10 @@ static void share_userfile_line(int idx, char *par) {
 
 
 static void share_userfile_start(int idx, char *par) {
 static void share_userfile_start(int idx, char *par) {
   dcc[idx].status |= STAT_GETTING;
   dcc[idx].status |= STAT_GETTING;
+  /* Start up a tbuf to queue outgoing changes for this bot until the
+   * userlist is done transferring.
+   */
+  new_tbuf(dcc[idx].nick);
   stream_in = new bd::Stream();
   stream_in = new bd::Stream();
 }
 }