Avoid doing pointless lookups against numbered networks
This commit is contained in:
9
main.py
9
main.py
@@ -1,5 +1,6 @@
|
||||
from json import load, dump, loads
|
||||
import redis
|
||||
from string import digits
|
||||
from utils.loaders.command_loader import loadCommands
|
||||
from utils.logging.log import *
|
||||
|
||||
@@ -26,6 +27,14 @@ MonitorPool = []
|
||||
|
||||
CommandMap = {}
|
||||
|
||||
def nets():
|
||||
if not "pool" in globals():
|
||||
return
|
||||
networks = set()
|
||||
for i in pool:
|
||||
networks.add("".join([x for x in i if not i in digits]))
|
||||
return networks
|
||||
|
||||
def register(command, function):
|
||||
if not command in CommandMap:
|
||||
CommandMap[command] = function
|
||||
|
||||
Reference in New Issue
Block a user