7x\x1b bug fixed

This commit is contained in:
.[d]. 2022-03-19 12:28:39 -05:00
parent 6095b81167
commit 92f2b978a5
2 changed files with 9 additions and 4 deletions

View File

@ -42,6 +42,7 @@ dr1p4ns1 v2.666 - cp437 ansi parser
- ! added a floodrate delay interval for servers like efnet, press d to set the delay interval
- ? the delay option waits x seconds between each line sent to a server to prevent a server flood kick/ban
- ? an integer like 0, 1, 2 etc or even float 0.3, 1.666 fractions are accepted as a delay interval
- ! fixed a bug where the pre-screening of certain ansi files would trip on 7h\x1b
```
## screenshots
![screenshots](screenshots/ss1.jpg)

View File

@ -100,6 +100,7 @@ def getfiles(argv=""):
class D:
def __init__(self):
self.delay=FLOODRATE_INTERVAL_SECONDS
self.correct=0
########################################################################################################## CLASS DR1P4NS1 - 2
class dr1p4ns1:
@ -631,11 +632,14 @@ class UI:
sleep(1)
break
print(f'{C}loading{B}: {S}{self.files[index]}')
d=dr1p4ns1(ansifile=self.files[index],width=80,debug=False)
try:
d=dr1p4ns1(ansifile=self.files[index],width=80,debug=False)
except:
pass
decoder=ANSIDecoder(self.files[index],d.width)
print('\x1bc')
decoder.as_terminal()
except:
except
pass
elif k == 'right':
index+=1
@ -1240,7 +1244,7 @@ class ANSIDecoder:
if __name__=="__main__":
dr1p=D()
FIFO_ENABLED = os.path.exists(FIFO_PATH)
files = getfiles(sys.argv)
ui = UI(files)
dr1p.files = getfiles(sys.argv)
ui = UI(dr1p.files)
#################################################################################################### #######################
########################################################################################### dr1p4ns1 version 2.666 ##### EOF