mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Fixed attempt to make IRC work
This commit is contained in:
parent
9287d8a908
commit
8a26be8906
|
@ -22,7 +22,7 @@ class AioIRCCat(irc.client_aio.AioSimpleIRCClient):
|
||||||
self.connection.buffer_class.errors = "replace" # Ignore encoding errors
|
self.connection.buffer_class.errors = "replace" # Ignore encoding errors
|
||||||
self.connection_details = None
|
self.connection_details = None
|
||||||
self.active = True
|
self.active = True
|
||||||
asyncio.get_event_loop().create_task(self.testactivity())
|
self.activity_tester = asyncio.get_event_loop().create_task(self.testactivity())
|
||||||
|
|
||||||
def on_welcome(self, connection, event): # Join IRC channels
|
def on_welcome(self, connection, event): # Join IRC channels
|
||||||
for channel in self.targets.values():
|
for channel in self.targets.values():
|
||||||
|
@ -69,11 +69,12 @@ class AioIRCCat(irc.client_aio.AioSimpleIRCClient):
|
||||||
logger.debug("New website appended to the list (discussions)! {}".format(full_url))
|
logger.debug("New website appended to the list (discussions)! {}".format(full_url))
|
||||||
|
|
||||||
async def testactivity(self):
|
async def testactivity(self):
|
||||||
await asyncio.sleep(100.0)
|
while True:
|
||||||
if not self.active:
|
await asyncio.sleep(100.0)
|
||||||
logger.error("There were no new messages in the feed!")
|
if not self.active:
|
||||||
self.on_disconnect(None, None)
|
logger.error("There were no new messages in the feed!")
|
||||||
self.active = False
|
self.on_disconnect(None, None)
|
||||||
|
self.active = False
|
||||||
|
|
||||||
def recognize_langs(path):
|
def recognize_langs(path):
|
||||||
lang = ""
|
lang = ""
|
||||||
|
|
Loading…
Reference in a new issue