Compare commits

...

3 Commits

Author SHA1 Message Date
Dionysus ca2fb50ea1
acidvegas is a skid 2023-07-25 15:31:55 -04:00
Dionysus 6b6d199ccf
acidvegas is a skid 2023-07-25 15:12:26 -04:00
Dionysus 142de532c3
Fixed again (acidvegas is a skid) 2023-07-25 14:59:51 -04:00
1 changed files with 5 additions and 4 deletions

View File

@ -64,11 +64,12 @@ class Bot():
if not os.path.exists(FIFO_PATH):
os.mkfifo(FIFO_PATH)
while True:
async with aiofiles.open(FIFO_PATH) as fifo:
async with aiofiles.open(FIFO_PATH, mode='r') as fifo:
while True:
try:
for line in fifo:
await self.sendmsg(connection.channel, log_line)
content = await fifo.readlines()
for line in content:
await self.sendmsg(connection.channel, line)
await asyncio.sleep(0.1)
except Exception as ex:
try:
@ -89,7 +90,7 @@ class Bot():
'family' : 10 if connection.ipv6 else 2,
'local_addr' : connection.vhost
}
self.reader, self.writer = await asyncio.wait_for(asyncio.open_connection(**options), 30)
self.reader, self.writer = await asyncio.wait_for(asyncio.open_connection(**options), 300)
await self.raw(f'USER {identity.username} 0 * :{identity.realname}')
await self.raw('NICK ' + identity.nickname)
except Exception as ex: