mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: 搞炸了 让我思考下
This commit is contained in:
parent
b9297e3f1d
commit
e1ac0f02b4
@ -45,15 +45,16 @@ export class NativePacketClient extends PacketClient {
|
|||||||
const platform = process.platform + '.' + process.arch;
|
const platform = process.platform + '.' + process.arch;
|
||||||
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './moehoo/MoeHoo.' + platform + '.node');
|
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './moehoo/MoeHoo.' + platform + '.node');
|
||||||
process.dlopen(this.MoeHooExport, moehoo_path, constants.dlopen.RTLD_LAZY);
|
process.dlopen(this.MoeHooExport, moehoo_path, constants.dlopen.RTLD_LAZY);
|
||||||
this.MoeHooExport.exports.InitHook?.(recv, send, (type: number, uin: string, seq: number, cmd: string, hex_data: string) => {
|
console.log('MoeHooExport:', this.MoeHooExport);
|
||||||
const callback = this.cb.get(createHash('md5').update(Buffer.from(hex_data, 'hex')).digest('hex') + (type === 0 ? 'send' : 'recv'));
|
// this.MoeHooExport.exports.InitHook?.(recv, send, (type: number, uin: string, seq: number, cmd: string, hex_data: string) => {
|
||||||
if (callback) {
|
// const callback = this.cb.get(createHash('md5').update(Buffer.from(hex_data, 'hex')).digest('hex') + (type === 0 ? 'send' : 'recv'));
|
||||||
callback({ seq, cmd, hex_data });
|
// if (callback) {
|
||||||
} else {
|
// callback({ seq, cmd, hex_data });
|
||||||
this.logger.logError(`Callback not found for hex_data: ${hex_data}`);
|
// } else {
|
||||||
}
|
// this.logger.logError(`Callback not found for hex_data: ${hex_data}`);
|
||||||
console.log('type:', type, 'uin:', uin, 'seq:', seq, 'cmd:', cmd, 'hex_data:', hex_data);
|
// }
|
||||||
});
|
// console.log('type:', type, 'uin:', uin, 'seq:', seq, 'cmd:', cmd, 'hex_data:', hex_data);
|
||||||
|
// });
|
||||||
this.isAvailable = true;
|
this.isAvailable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user