Add prompt for kick/ban reason
This commit is contained in:
parent
e075d2f95a
commit
24fcce3f87
3 changed files with 22 additions and 7 deletions
|
|
@ -663,7 +663,7 @@ Channel.prototype.handleNameBan = function (actor, name, reason) {
|
|||
|
||||
if (err) {
|
||||
actor.socket.emit("errorMsg", {
|
||||
msg: "Internal error " + err
|
||||
msg: "Internal error: " + err
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -295,13 +295,25 @@ function handleKick(chan, user, args) {
|
|||
}
|
||||
|
||||
function handleIPBan(chan, user, args) {
|
||||
chan.handleBanAllIP(user, args[0], "", args[1]);
|
||||
var name = args.shift();
|
||||
var range = args.shift();
|
||||
var reason;
|
||||
if (range !== "range") {
|
||||
reason = range + " " + args.join(" ");
|
||||
range = false;
|
||||
} else {
|
||||
reason = args.join(" ");
|
||||
range = true;
|
||||
}
|
||||
chan.handleBanAllIP(user, name, reason, range);
|
||||
// Ban the name too for good measure
|
||||
chan.handleNameBan(user, args[0], "");
|
||||
chan.handleNameBan(user, name, reason);
|
||||
}
|
||||
|
||||
function handleBan(chan, user, args) {
|
||||
chan.handleNameBan(user, args[0], "");
|
||||
var name = args.shift();
|
||||
var reason = args.join(" ");
|
||||
chan.handleNameBan(user, name, reason);
|
||||
}
|
||||
|
||||
function handleUnban(chan, user, args) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue