mirror of
git://git.acid.vegas/archive.git
synced 2024-11-21 23:56:40 +00:00
acidvegas is a skid
This commit is contained in:
parent
142de532c3
commit
6b6d199ccf
@ -64,11 +64,12 @@ class Bot():
|
|||||||
if not os.path.exists(FIFO_PATH):
|
if not os.path.exists(FIFO_PATH):
|
||||||
os.mkfifo(FIFO_PATH)
|
os.mkfifo(FIFO_PATH)
|
||||||
while True:
|
while True:
|
||||||
async with aiofiles.open(FIFO_PATH) as fifo:
|
async with aiofiles.open(FIFO_PATH, mode='r') as fifo:
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
for line in fifo.readlines():
|
content = await fifo.readlines()
|
||||||
await self.sendmsg(connection.channel, line.rstrip())
|
for line in content:
|
||||||
|
await self.sendmsg(connection.channel, line)
|
||||||
await asyncio.sleep(0.1)
|
await asyncio.sleep(0.1)
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user