Kill a bug
这个提交包含在:
21
CGI.js
21
CGI.js
@ -29,6 +29,27 @@ request.post({
|
|||||||
console.log(Session);
|
console.log(Session);
|
||||||
exports.HOOK = HOOK;
|
exports.HOOK = HOOK;
|
||||||
exports.frame={
|
exports.frame={
|
||||||
|
raw: function(u,MData){
|
||||||
|
var Req = new net.Socket();
|
||||||
|
var KData = MData.replace("@Session",Session);
|
||||||
|
var BData = Buffer.from(KData);
|
||||||
|
console.log(KData)
|
||||||
|
var MainData = `POST /${u} HTTP/1.1\r\nHost: 127.0.0.1:${ServicePort}\r\nContent-Type: application/json; charset=UTF-8;\r\nContent-Length:${KData.length}\r\n\r\n`;
|
||||||
|
console.log(MainData)
|
||||||
|
Req.connect(ServicePort,"127.0.0.1",()=>{
|
||||||
|
Req.write(MainData);
|
||||||
|
Req.write(BData);
|
||||||
|
Req.on("data",(data)=>{
|
||||||
|
console.log(data.toString());
|
||||||
|
});
|
||||||
|
Req.on("end",()=>{
|
||||||
|
Req.end();
|
||||||
|
});
|
||||||
|
Req.on("close",()=>{
|
||||||
|
Req.end();
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
SendImg: function(c,info,p){
|
SendImg: function(c,info,p){
|
||||||
this.SetHook(true);
|
this.SetHook(true);
|
||||||
|
|||||||
3
Core.js
3
Core.js
@ -48,7 +48,7 @@ global.LoadMoudel = (() => {
|
|||||||
});
|
});
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
global.LoadMoudel();
|
global.LoadMoudel();
|
||||||
//var HOOK = false;
|
//var HOOK = false;
|
||||||
@ -291,5 +291,6 @@ exports.frame={
|
|||||||
console.log("["+new Date().toString()+"][./Core.js]线程处理完毕\r\n");
|
console.log("["+new Date().toString()+"][./Core.js]线程处理完毕\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
global.DEBUG.CGI = JSCGI;
|
global.DEBUG.CGI = JSCGI;
|
||||||
global.DEBUG.Debug = require("./Debug.js");
|
global.DEBUG.Debug = require("./Debug.js");
|
||||||
19
WRH.ts
19
WRH.ts
@ -1,2 +1,19 @@
|
|||||||
// Word Recitation Helper
|
// Word Recitation Helper
|
||||||
// 单词背诵助手
|
// 单词背诵助手
|
||||||
|
|
||||||
|
import * as Core from "./Core";
|
||||||
|
const command = {
|
||||||
|
"prefix":"WRH",
|
||||||
|
"answer":"ANS ",
|
||||||
|
"key":"KEY",
|
||||||
|
"require":"REQ",
|
||||||
|
"select":"SEL ",
|
||||||
|
"rankinglist":"RAL"
|
||||||
|
}
|
||||||
|
Core.AddListener((c,i)=>{
|
||||||
|
|
||||||
|
if(i.message.substring(0,command.prefix.length) == command.prefix){
|
||||||
|
var subcommand = i.message.replace(command.prefix,"");
|
||||||
|
subcommand
|
||||||
|
}
|
||||||
|
})
|
||||||
在新工单中引用
屏蔽一个用户