import { TCPHandler, Context } from '../class'; export default class SSHLogins extends TCPHandler { constructor() { super(); this.endpoint = 'sshlogins'; } public async handle(ctx: Context) { const sshLogins = await ctx.client.util.exec(`who | grep ${ctx.data.username} | wc -l`); return ctx.send(sshLogins); } }