mirror of https://github.com/calzoneman/sync.git
/clean: error when no argument given
This commit is contained in:
parent
52e444ab64
commit
9debebd4b9
|
@ -2,7 +2,7 @@
|
||||||
"author": "Calvin Montgomery",
|
"author": "Calvin Montgomery",
|
||||||
"name": "CyTube",
|
"name": "CyTube",
|
||||||
"description": "Online media synchronizer and chat",
|
"description": "Online media synchronizer and chat",
|
||||||
"version": "3.14.4",
|
"version": "3.14.5",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "http://github.com/calzoneman/sync"
|
"url": "http://github.com/calzoneman/sync"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1167,6 +1167,12 @@ PlaylistModule.prototype.handleClean = function (user, msg, meta) {
|
||||||
|
|
||||||
var args = msg.split(" ");
|
var args = msg.split(" ");
|
||||||
var cmd = args.shift();
|
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(" "));
|
var target = generateTargetRegex(args.join(" "));
|
||||||
|
|
||||||
this.channel.logger.log("[playlist] " + user.getName() + " used " + cmd +
|
this.channel.logger.log("[playlist] " + user.getName() + " used " + cmd +
|
||||||
|
|
Loading…
Reference in New Issue