karin-plugin-teamspeak 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/apps/ts3.d.ts +1 -1
- package/lib/apps/ts3.js +6 -6
- package/package.json +1 -1
package/lib/apps/ts3.d.ts
CHANGED
package/lib/apps/ts3.js
CHANGED
|
@@ -172,20 +172,20 @@ export const getAllUserList = async () => {
|
|
|
172
172
|
count += clients.length;
|
|
173
173
|
res[channel.name] = clients.map((c) => {
|
|
174
174
|
const connectTimeSec = moment().diff(moment.unix(c.lastconnected), "second");
|
|
175
|
-
let connectTime =
|
|
175
|
+
let connectTime = `${Math.floor(connectTimeSec / 60)}:${Math.floor(connectTimeSec % 60)}`;
|
|
176
176
|
return {
|
|
177
177
|
nickName: c.nickname, //昵称
|
|
178
178
|
lastconnected: moment
|
|
179
179
|
.unix(c.lastconnected)
|
|
180
180
|
.format("YYYY-MM-DD HH:mm:ss"), //上次连接进来的时间
|
|
181
|
-
connectTime, //已经连接的时间 -
|
|
181
|
+
connectTime, //已经连接的时间 - 单位分:秒
|
|
182
182
|
};
|
|
183
183
|
});
|
|
184
|
-
return {
|
|
185
|
-
res,
|
|
186
|
-
count,
|
|
187
|
-
};
|
|
188
184
|
}
|
|
185
|
+
return {
|
|
186
|
+
res,
|
|
187
|
+
count,
|
|
188
|
+
};
|
|
189
189
|
}
|
|
190
190
|
else {
|
|
191
191
|
return null;
|