|
|
@@ -1179,11 +1179,13 @@ shareout_prot(struct userrec *u, const char *format, ...)
|
|
|
s[2 + (l = 509)] = 0;
|
|
|
va_end(va);
|
|
|
|
|
|
+ int localhub = nextbot(u->handle);
|
|
|
+
|
|
|
for (int i = 0; i < dcc_total; i++) {
|
|
|
if (dcc[i].type && (dcc[i].type->flags & DCT_BOT) &&
|
|
|
(dcc[i].status & STAT_SHARE) && !(dcc[i].status & (STAT_GETTING | STAT_SENDING)) &&
|
|
|
- /* only send to hubs and to the same user */
|
|
|
- (dcc[i].hub || dcc[i].user == u)) {
|
|
|
+ /* only send to hubs, the bot itself, or the localhub in the chain */
|
|
|
+ (dcc[i].hub || dcc[i].user == u || (localhub != -1 && i == localhub))) {
|
|
|
tputs(dcc[i].sock, s, l + 2);
|
|
|
}
|
|
|
}
|