diff options
Diffstat (limited to 'protocols/inspircd2.c')
-rw-r--r-- | protocols/inspircd2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/inspircd2.c b/protocols/inspircd2.c index 8b25be5..07a7ba6 100644 --- a/protocols/inspircd2.c +++ b/protocols/inspircd2.c @@ -1334,12 +1334,14 @@ int inspircd2_protocol_handle_rsquit(struct string source, size_t argc, struct s for (size_t i = 0; i < server_list.len; i++) { struct server_info *target = server_list.array[i].ptr; - if (target->protocol != INSPIRCD2_PROTOCOL) + if (target != self && target->protocol != INSPIRCD2_PROTOCOL) continue; // TODO: Maybe actually unlink this somehow if (!STRING_EQ(target->name, argv[0])) continue; - if (has_table_index(target->connected_to, SID)) { + if (target == self) { + networks[net].shutdown(handle); + } else if (has_table_index(target->connected_to, SID)) { networks[target->net].shutdown(target->handle); } else { struct server_info *next = get_table_index(server_list, target->next); @@ -1355,6 +1357,8 @@ int inspircd2_protocol_handle_rsquit(struct string source, size_t argc, struct s networks[next->net].send(next->handle, STRING(" :\n")); } } + + break; } return 0; |