diff options
author | TDavis | 2019-03-30 02:18:10 -0300 |
---|---|---|
committer | TDavis | 2019-03-30 02:18:10 -0300 |
commit | 7e1d9532ef1ca39a52793bcd0d940a9ebd976879 (patch) | |
tree | e2c5dd9782457ee583a1bbcdc710b8acc48e072f /cgi | |
parent | caadbc2788d32fdc4baf9cbd197c0fb5d495e580 (diff) | |
download | weabot-7e1d9532ef1ca39a52793bcd0d940a9ebd976879.tar.gz weabot-7e1d9532ef1ca39a52793bcd0d940a9ebd976879.tar.xz weabot-7e1d9532ef1ca39a52793bcd0d940a9ebd976879.zip |
Mover hilos fix 4 Test 7
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/manage.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cgi/manage.py b/cgi/manage.py index 36217b9..7545c06 100644 --- a/cgi/manage.py +++ b/cgi/manage.py @@ -478,7 +478,7 @@ def manage(self, path_split): else: tym = post["timestamp"] message += "IP: "+post['ip'] - post['timestamp_formatted'] += ' ID:' + iphash(post['ip'], post, tym, board["useid"], False, '', False, False, (board["countrycode"] in ['1', '2'])) + post['timestamp_formatted'] += ' ID:' + iphash(inet_ntoa(post['ip']), post, tym, board["useid"], False, '', False, False, (board["countrycode"] in ['1', '2'])) # insert new post and get its new ID new_id = post.insert() @@ -1705,7 +1705,10 @@ def manage(self, path_split): if self.formdata['ip'] != '': formatted_ip = str(inet_aton(self.formdata['ip'])) posts = FetchAll("SELECT posts.*, boards.dir, boards.board_type, boards.subject AS default_subject FROM `posts` JOIN `boards` ON boards.id = posts.boardid WHERE ip = '%s' ORDER BY posts.timestamp DESC" % _mysql.escape_string(formatted_ip)) - ip = self.formdata['ip'] + if '.' in self.formdata['ip']: + ip = self.formdata['ip'] + else: + ip = inet_ntoa(self.formdata['ip']) template_filename = "ipshow.html" template_values = {"mode": 1, "ip": ip, "host": getHost(ip), "country": getCountry(ip), "tor": addressIsTor(ip), "posts": posts} logAction(staff_account['username'], "ipshow on {}".format(ip)) |