From 459651de2f08e4041e0bfea975c4ce3153883109 Mon Sep 17 00:00:00 2001 From: mrhanky Date: Tue, 16 May 2017 18:37:27 +0200 Subject: [PATCH] Added restore for tells --- nxy/plugins/futures.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nxy/plugins/futures.py b/nxy/plugins/futures.py index 044b3ea..2324e9a 100644 --- a/nxy/plugins/futures.py +++ b/nxy/plugins/futures.py @@ -29,6 +29,13 @@ class Futures(DatabasePlugin): args = (IrcString(res['mask']), res['channel'], delta, res['message'], res['delay'], res['id']) asyncio.ensure_future(self._timer(*args)) + # Restore tells from database + self.cur.execute('select * from tells') + for res in self.cur.fetchall(): + user = res['user'] + if user not in self.tell_queue: + self.tell_queue[user] = [] + self.tell_queue[user].append(res) @command def timer(self, mask: IrcString, channel: IrcString, args: DocOptDict):