encodeSteamMessage 中 echo 消息始终使用 friendId 获取对方信息, 避免会话名称被自己的名字覆盖。同时包含 Web 聊天界面及相关重构。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
570 B
JavaScript
25 lines
570 B
JavaScript
function getRandomInt(min, max) {
|
|
min = Math.ceil(min);
|
|
max = Math.floor(max);
|
|
return Math.floor(Math.random() * (max - min)) + min;
|
|
}
|
|
|
|
module.exports = {
|
|
accountName: 'accountName',
|
|
password: 'password',
|
|
logonID: getRandomInt(1000000, 999999999),
|
|
steamID: "xxxxxxxxxx",
|
|
chat: {
|
|
enabled: false,
|
|
host: '0.0.0.0',
|
|
port: 3000,
|
|
wsPath: '/ws',
|
|
auth: {
|
|
username: 'admin',
|
|
password: 'change-me',
|
|
realm: 'Steam Chat',
|
|
trustProxy: false,
|
|
},
|
|
},
|
|
};
|