|
|
@ -29,7 +29,6 @@ def getChanFree(net, new):
|
|
|
|
chanlimits.add(main.IRCPool[name].chanlimit)
|
|
|
|
chanlimits.add(main.IRCPool[name].chanlimit)
|
|
|
|
if not len(chanlimits) == 1:
|
|
|
|
if not len(chanlimits) == 1:
|
|
|
|
error("Network %s has servers with different CHANLIMIT values" % net)
|
|
|
|
error("Network %s has servers with different CHANLIMIT values" % net)
|
|
|
|
print(chanlimits)
|
|
|
|
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
return (chanfree, chanlimits.pop())
|
|
|
|
return (chanfree, chanlimits.pop())
|
|
|
|
|
|
|
|
|
|
|
@ -87,9 +86,6 @@ def minifyChans(net, listinfo):
|
|
|
|
return listinfo
|
|
|
|
return listinfo
|
|
|
|
|
|
|
|
|
|
|
|
def keepChannels(net, listinfo, mean, sigrelay, relay):
|
|
|
|
def keepChannels(net, listinfo, mean, sigrelay, relay):
|
|
|
|
#print("list", listinfo)
|
|
|
|
|
|
|
|
#print("sigrelay", sigrelay)
|
|
|
|
|
|
|
|
#print("cur", len(main.network[net].relays.keys()))
|
|
|
|
|
|
|
|
listinfo = minifyChans(net, listinfo)
|
|
|
|
listinfo = minifyChans(net, listinfo)
|
|
|
|
if not listinfo:
|
|
|
|
if not listinfo:
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -112,17 +108,6 @@ def keepChannels(net, listinfo, mean, sigrelay, relay):
|
|
|
|
populateChans(net, siglist, sigrelay, newNums)
|
|
|
|
populateChans(net, siglist, sigrelay, newNums)
|
|
|
|
notifyJoin(net)
|
|
|
|
notifyJoin(net)
|
|
|
|
|
|
|
|
|
|
|
|
#print("coverall", coverAll)
|
|
|
|
|
|
|
|
#print("needed", needed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#def purgeRecords(net):
|
|
|
|
|
|
|
|
# base = "list.%s" % net
|
|
|
|
|
|
|
|
# p = main.g.pipeline()
|
|
|
|
|
|
|
|
# existingChans = main.g.smembers("list."+net)
|
|
|
|
|
|
|
|
# for i in existingChans:
|
|
|
|
|
|
|
|
# p.delete(base+"."+i.decode("utf-8"))
|
|
|
|
|
|
|
|
# p.execute()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def nukeNetwork(net):
|
|
|
|
def nukeNetwork(net):
|
|
|
|
#purgeRecords(net)
|
|
|
|
#purgeRecords(net)
|
|
|
|
#p = main.g.pipeline()
|
|
|
|
#p = main.g.pipeline()
|
|
|
@ -135,7 +120,6 @@ def nukeNetwork(net):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _initialList(net, num, listinfo, chanlimit):
|
|
|
|
def _initialList(net, num, listinfo, chanlimit):
|
|
|
|
#listinfo = sorted(listinfo, key=lambda x: xdd[0])
|
|
|
|
|
|
|
|
listlength = len(listinfo)
|
|
|
|
listlength = len(listinfo)
|
|
|
|
cumul = 0
|
|
|
|
cumul = 0
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|