Switch to using Redis for LIST storage

This commit is contained in:
2019-10-08 21:10:42 +01:00
parent 7e90080a2c
commit 33cb173db6
2 changed files with 66 additions and 28 deletions

View File

@@ -2,6 +2,7 @@ from twisted.internet.ssl import DefaultOpenSSLContextFactory
import json
from modules import alias
from modules.chankeep import nukeNetwork
from twisted.internet import reactor
from core.bot import IRCBot, IRCBotFactory
import main
@@ -19,7 +20,6 @@ class Network:
self.last = 0
self.relays = {}
self.aliases = {}
self.list = {}
def add_relay(self, num=None):
if not num:
@@ -60,6 +60,7 @@ class Network:
def seppuku(self):
# Removes all bots in preperation for deletion
self.killAliases(self.relays.keys())
nukeNetwork(self.net)
def start_bot(self, num):
# a single name is given to relays in the backend