Bläddra i källkod

No need to send write_userfile_protected entries to localhubs.

Partially reverts 1da96702.
Bryan Drewery 10 år sedan
förälder
incheckning
b1928f10c5
1 ändrade filer med 2 tillägg och 3 borttagningar
  1. 2 3
      src/userent.cc

+ 2 - 3
src/userent.cc

@@ -95,9 +95,8 @@ bool def_kill(struct user_entry *e)
 
 
 void write_userfile_protected(bd::Stream& stream, const struct userrec *u, const struct user_entry *e, int idx)
 void write_userfile_protected(bd::Stream& stream, const struct userrec *u, const struct user_entry *e, int idx)
 {
 {
-  int localhub = nextbot(u->handle);
-  /* only write if saving local, or if sending to hub, or if sending to same user as entry, or the localhub in the chain */
-  if (idx == -1 || dcc[idx].hub || dcc[idx].user == u || (localhub != -1 && idx == localhub)) {
+  /* only write if saving local, or if sending to hub, or if sending to same user as entry */
+  if (idx == -1 || dcc[idx].hub || dcc[idx].user == u) {
     stream << bd::String::printf("--%s %s\n", e->type->name, e->u.string);
     stream << bd::String::printf("--%s %s\n", e->type->name, e->u.string);
   }
   }
 }
 }