This commit is contained in:
parent
aa649efb68
commit
e39f9c3f94
1 changed files with 7 additions and 1 deletions
|
@ -855,7 +855,7 @@ while True:
|
||||||
gsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
gsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
gemsocket = ssl.wrap_socket(gsocket)
|
gemsocket = ssl.wrap_socket(gsocket)
|
||||||
gemsocket.connect((parse.hostname, 1965))
|
gemsocket.connect((parse.hostname, 1965))
|
||||||
gemsocket.send(i + "\r\n")
|
gemsocket.send(bytes(i + "\r\n", "UTF-8"))
|
||||||
received = ""
|
received = ""
|
||||||
while True:
|
while True:
|
||||||
gemresponse = gemsocket.recv(2048)
|
gemresponse = gemsocket.recv(2048)
|
||||||
|
@ -869,10 +869,16 @@ while True:
|
||||||
for i in received.split("\n"):
|
for i in received.split("\n"):
|
||||||
if firstline:
|
if firstline:
|
||||||
if i.split(" ")[0][0] != "2":
|
if i.split(" ")[0][0] != "2":
|
||||||
|
title = True
|
||||||
multiline("(" + nick + f") [{i}]", channel)
|
multiline("(" + nick + f") [{i}]", channel)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
firstline = False
|
firstline = False
|
||||||
|
if i.split(" ")[1] != "text/gemini":
|
||||||
|
typee = i.split(" ")[1]
|
||||||
|
multiline("(" + nick + f") [Non-Gemtext file: {typee}]", channel)
|
||||||
|
title = True
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
if i.split(" ")[0][0] == "#":
|
if i.split(" ")[0][0] == "#":
|
||||||
title = True
|
title = True
|
||||||
|
|
Loading…
Add table
Reference in a new issue