/clean: error when no argument given

This commit is contained in:
calzoneman 2016-03-28 22:31:35 -07:00
parent 52e444ab64
commit 9debebd4b9
2 changed files with 7 additions and 1 deletions

View file

@ -2,7 +2,7 @@
"author": "Calvin Montgomery",
"name": "CyTube",
"description": "Online media synchronizer and chat",
"version": "3.14.4",
"version": "3.14.5",
"repository": {
"url": "http://github.com/calzoneman/sync"
},

View file

@ -1167,6 +1167,12 @@ PlaylistModule.prototype.handleClean = function (user, msg, meta) {
var args = msg.split(" ");
var cmd = args.shift();
if (args.length === 0) {
return user.socket.emit("errorMsg", {
msg: "No target given for " + cmd + ". Usage: /clean <username> or " +
"/cleantitle <title>"
});
}
var target = generateTargetRegex(args.join(" "));
this.channel.logger.log("[playlist] " + user.getName() + " used " + cmd +