Import the main module properly and fix some oddities in Twisted to prevent it from discarding some data
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
from core.main import *
|
||||
import main
|
||||
from utils.logging.log import *
|
||||
from utils.logging.send import *
|
||||
|
||||
def parseCommand(addr, authed, data):
|
||||
#call command modules with: (addr, authed, data, spl, success, failure, info, incUsage, length)
|
||||
spl = data.split()
|
||||
if addr in connections.keys():
|
||||
obj = connections[addr]
|
||||
if addr in main.connections.keys():
|
||||
obj = main.connections[addr]
|
||||
else:
|
||||
warn("Got connection object with no instance in the address pool")
|
||||
return
|
||||
@@ -22,9 +22,9 @@ def parseCommand(addr, authed, data):
|
||||
else:
|
||||
failure("No text was sent")
|
||||
return
|
||||
for i in CommandMap.keys():
|
||||
for i in main.CommandMap.keys():
|
||||
if spl[0] == i:
|
||||
CommandMap[i](addr, authed, data, obj, spl, success, failure, info, incUsage, length)
|
||||
main.CommandMap[i](addr, authed, data, obj, spl, success, failure, info, incUsage, length)
|
||||
return
|
||||
incUsage(None)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user