This commit is contained in:
Eichhornchen
2021-01-07 18:13:20 +01:00
parent eae4f13066
commit a8d38faa62
2 changed files with 6 additions and 18 deletions

View File

@ -198,22 +198,6 @@ class HelloTLV(TLV):
if not self.is_long:
user.send_packet(sender, Packet.construct(HelloTLV.construct(16, user, sender)))
def handle_multicast(self, user: Any, sender: Any) -> None:
if sender.id > 0 and sender.id != self.source_id:
user.add_system_message(f"A client known as the id {sender.id} declared that it uses "
f"the id {self.source_id}.")
sender.id = self.source_id
if self.source_id == user.id:
sender.marked_as_banned = True
if not sender.active:
sender.id = self.source_id # The sender we are given misses an id
# Add entry to/actualize the active peers dictionnary
user.update_peer_table(sender)
user.add_system_message(f"{self.source_id} sent me a Hello on multicast")
@property
def is_long(self) -> bool: