mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-27 17:50:24 +02:00
caa46042bf
Several ES6 additions are only available in strict mode. Example: > SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode Strict mode was also enabled in a few of our files already, and it is a good thing to have anyway.
20 lines
432 B
JavaScript
20 lines
432 B
JavaScript
"use strict";
|
|
|
|
var ClientManager = new require("../clientManager");
|
|
var program = require("commander");
|
|
|
|
program
|
|
.command("list")
|
|
.description("List all users")
|
|
.action(function() {
|
|
var users = new ClientManager().getUsers();
|
|
if (!users.length) {
|
|
log.warn("No users found!");
|
|
} else {
|
|
console.log("Users:");
|
|
for (var i = 0; i < users.length; i++) {
|
|
console.log(" " + (i + 1) + ". " + users[i]);
|
|
}
|
|
}
|
|
});
|