Fix cancel for kick/ban/ipban
This commit is contained in:
parent
400e15dea8
commit
3ae2deca7c
|
@ -251,6 +251,9 @@ function addUserDropdown(entry) {
|
||||||
.text("Kick")
|
.text("Kick")
|
||||||
.click(function () {
|
.click(function () {
|
||||||
var reason = prompt("Enter kick reason (optional)");
|
var reason = prompt("Enter kick reason (optional)");
|
||||||
|
if (reason === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
socket.emit("chatMsg", {
|
socket.emit("chatMsg", {
|
||||||
msg: "/kick " + name + " " + reason,
|
msg: "/kick " + name + " " + reason,
|
||||||
meta: {}
|
meta: {}
|
||||||
|
@ -302,6 +305,9 @@ function addUserDropdown(entry) {
|
||||||
.text("Name Ban")
|
.text("Name Ban")
|
||||||
.click(function () {
|
.click(function () {
|
||||||
var reason = prompt("Enter ban reason (optional)");
|
var reason = prompt("Enter ban reason (optional)");
|
||||||
|
if (reason === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
socket.emit("chatMsg", {
|
socket.emit("chatMsg", {
|
||||||
msg: "/ban " + name + " " + reason,
|
msg: "/ban " + name + " " + reason,
|
||||||
meta: {}
|
meta: {}
|
||||||
|
@ -312,6 +318,9 @@ function addUserDropdown(entry) {
|
||||||
.text("IP Ban")
|
.text("IP Ban")
|
||||||
.click(function () {
|
.click(function () {
|
||||||
var reason = prompt("Enter ban reason (optional)");
|
var reason = prompt("Enter ban reason (optional)");
|
||||||
|
if (reason === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
socket.emit("chatMsg", {
|
socket.emit("chatMsg", {
|
||||||
msg: "/ipban " + name + " " + reason,
|
msg: "/ipban " + name + " " + reason,
|
||||||
meta: {}
|
meta: {}
|
||||||
|
|
Loading…
Reference in a new issue