summaryrefslogtreecommitdiff
path: root/crocoite/irc.py
diff options
context:
space:
mode:
Diffstat (limited to 'crocoite/irc.py')
-rw-r--r--crocoite/irc.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/crocoite/irc.py b/crocoite/irc.py
index 095c55f..99485e4 100644
--- a/crocoite/irc.py
+++ b/crocoite/irc.py
@@ -29,8 +29,8 @@ from enum import IntEnum, Enum
from collections import defaultdict
from abc import abstractmethod
from functools import wraps
-from io import BytesIO
import bottom
+import websockets
### helper functions ###
def prettyTimeDelta (seconds):
@@ -333,11 +333,11 @@ class ArgparseBot (bottom.Client):
with self._quit:
await args.func (user=user, args=args, reply=reply)
- async def onDisconnect (**kwargs):
+ async def onDisconnect (self, **kwargs):
""" Auto-reconnect """
self.logger.info ('disconnect', uuid='4c74b2c8-2403-4921-879d-2279ad85db72')
if not self._quit.armed:
- await asynio.sleep (10, loop=self.loop)
+ await asyncio.sleep (10, loop=self.loop)
self.logger.info ('reconnect', uuid='c53555cb-e1a4-4b69-b1c9-3320269c19d7')
await self.connect ()
@@ -492,8 +492,6 @@ class Chromebot (ArgparseBot):
if job.process and job.process.returncode is None:
job.process.terminate ()
-import websockets
-
class Dashboard:
__slots__ = ('fd', 'clients', 'loop', 'log', 'maxLog', 'pingInterval', 'pingTimeout')
# these messages will not be forwarded to the browser