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)
|
||||
gemsocket = ssl.wrap_socket(gsocket)
|
||||
gemsocket.connect((parse.hostname, 1965))
|
||||
gemsocket.send(i + "\r\n")
|
||||
gemsocket.send(bytes(i + "\r\n", "UTF-8"))
|
||||
received = ""
|
||||
while True:
|
||||
gemresponse = gemsocket.recv(2048)
|
||||
|
@ -869,10 +869,16 @@ while True:
|
|||
for i in received.split("\n"):
|
||||
if firstline:
|
||||
if i.split(" ")[0][0] != "2":
|
||||
title = True
|
||||
multiline("(" + nick + f") [{i}]", channel)
|
||||
break
|
||||
else:
|
||||
firstline = False
|
||||
if i.split(" ")[1] != "text/gemini":
|
||||
typee = i.split(" ")[1]
|
||||
multiline("(" + nick + f") [Non-Gemtext file: {typee}]", channel)
|
||||
title = True
|
||||
break
|
||||
else:
|
||||
if i.split(" ")[0][0] == "#":
|
||||
title = True
|
||||
|
|
Loading…
Add table
Reference in a new issue