From 1cfa60d818ed6d181b69160c5347a6f49cb68315 Mon Sep 17 00:00:00 2001 From: neptune Date: Wed, 28 Dec 2022 06:58:31 -0300 Subject: Arreglado oekaki con IPv6 --- cgi/oekaki.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cgi/oekaki.py b/cgi/oekaki.py index a58d0fd..088eac6 100644 --- a/cgi/oekaki.py +++ b/cgi/oekaki.py @@ -10,6 +10,7 @@ from formatting import * from template import * from post import * +import netaddr def oekaki(self, path_split): """ @@ -120,7 +121,7 @@ def oekaki(self, path_split): # 4: Data format board = setBoard(path_split[3]) - ip = inet_aton(self.ip) + ip = int(netaddr.IPAddress(self.ip)) fname = os.path.join(Settings.IMAGES_DIR, board['dir'], "temp", str(ip) + ".png") @@ -144,7 +145,7 @@ def oekaki(self, path_split): raise UserError('Esta sección no soporta oekaki.') ts = int(time.time()) - ip = inet_aton(self.ip) + ip = int(netaddr.IPAddress(self.ip)) fname = os.path.join(Settings.IMAGES_DIR, board['dir'], "temp", str(ip) + ".png") oek = 'no' -- cgit v1.2.1-18-gbd029