1
0
mirror of https://github.com/TheGreyDiamond/Enlight.git synced 2025-12-16 15:00:46 +01:00

Made it possible to use with diffrent ips

This commit is contained in:
TheGreyDiamond
2020-09-17 21:20:26 +02:00
parent 3020f5c78b
commit 51cce6ea73

View File

@@ -174,7 +174,9 @@ class enlightSession():
message = b"SESSION;" + self.sessionName.encode("utf-8") + b";" + self.sessionId.encode("utf-8") + b";" + VERSION.encode("utf-8") + b";" + self.passwordSet.encode("utf-8") + b";" + str(len(self.members)).encode("utf-8") + b"|"
while self.allowJoin:
self.__server__.sendto(message, ("192.168.178.255", 37020)) # <broadcast> 192.168.178.60 255.255.255.255
ipChoped = get_local_ip().split(".")
ipWithBroadEnding = ipChoped[0] + "." + ipChoped[1] + "." + ipChoped[2] + ".255"
self.__server__.sendto(message, (ipWithBroadEnding, 37020)) # <broadcast> 192.168.178.60 255.255.255.255
logging.info("Sent discovery broadcast")
time.sleep(1)