Added remote address and modules to agent structure. Help command now only shows commands for which the agent has been configured.
This commit is contained in:
@@ -138,7 +138,7 @@ proc httpPost*(request: Request) =
|
||||
headers.add((header, value.getStringValue()))
|
||||
|
||||
if cast[PacketType](header.packetType) == MSG_REGISTER:
|
||||
if not register(string.toBytes(request.body)):
|
||||
if not register(string.toBytes(request.body), request.remoteAddress):
|
||||
request.respond(400, body = "")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user