|
|
@ -1,7 +1,7 @@
|
|
|
|
from twisted.internet.ssl import DefaultOpenSSLContextFactory
|
|
|
|
from twisted.internet.ssl import DefaultOpenSSLContextFactory
|
|
|
|
import json
|
|
|
|
import json
|
|
|
|
|
|
|
|
|
|
|
|
import modules.alias as alias
|
|
|
|
from modules import alias
|
|
|
|
from twisted.internet import reactor
|
|
|
|
from twisted.internet import reactor
|
|
|
|
from core.bot import IRCBot, IRCBotFactory
|
|
|
|
from core.bot import IRCBot, IRCBotFactory
|
|
|
|
import main
|
|
|
|
import main
|
|
|
@ -43,6 +43,19 @@ class Network:
|
|
|
|
del self.aliases[id]
|
|
|
|
del self.aliases[id]
|
|
|
|
#del main.alias[id] - Aliases are global per num, so don't delete them!
|
|
|
|
#del main.alias[id] - Aliases are global per num, so don't delete them!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def seppuku(self):
|
|
|
|
|
|
|
|
# Removes all bots in preperation for deletion
|
|
|
|
|
|
|
|
for i in self.relays.keys():
|
|
|
|
|
|
|
|
name = self.net+str(i)
|
|
|
|
|
|
|
|
if name in main.ReactorPool.keys():
|
|
|
|
|
|
|
|
if name in main.FactoryPool.keys():
|
|
|
|
|
|
|
|
main.FactoryPool[name].stopTrying()
|
|
|
|
|
|
|
|
main.ReactorPool[name].disconnect()
|
|
|
|
|
|
|
|
if name in main.IRCPool.keys():
|
|
|
|
|
|
|
|
del main.IRCPool[name]
|
|
|
|
|
|
|
|
del main.ReactorPool[name]
|
|
|
|
|
|
|
|
del main.FactoryPool[name]
|
|
|
|
|
|
|
|
|
|
|
|
def start_bot(self, num):
|
|
|
|
def start_bot(self, num):
|
|
|
|
# a single name is given to relays in the backend
|
|
|
|
# a single name is given to relays in the backend
|
|
|
|
# e.g. freenode1 for the first relay on freenode network
|
|
|
|
# e.g. freenode1 for the first relay on freenode network
|
|
|
|