diff options
author | neptune | 2022-12-28 06:58:31 -0300 |
---|---|---|
committer | neptune | 2022-12-28 06:58:31 -0300 |
commit | 1cfa60d818ed6d181b69160c5347a6f49cb68315 (patch) | |
tree | 6eaf660829d960714f0348d9b4c5728e2a7d8247 /cgi | |
parent | b318f19b4911334d1d7c3b5196d938dd64d68d90 (diff) | |
download | weabot-1cfa60d818ed6d181b69160c5347a6f49cb68315.tar.gz weabot-1cfa60d818ed6d181b69160c5347a6f49cb68315.tar.xz weabot-1cfa60d818ed6d181b69160c5347a6f49cb68315.zip |
Arreglado oekaki con IPv6
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/oekaki.py | 5 |
1 files 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' |