Add banlist context menu item

This commit is contained in:
Al McKinlay 2017-12-19 11:39:50 +00:00
parent 09b2cd7527
commit 5084037cdc

View file

@ -133,6 +133,14 @@ $(function() {
data: target.data("id"),
});
}
if (target.hasClass("channel")) {
output += templates.contextmenu_item({
class: "list",
action: "banlist",
text: "List banned users",
data: target.data("id"),
});
}
output += templates.contextmenu_item({
class: "close",
action: "close",
@ -478,6 +486,12 @@ $(function() {
text: "/list",
});
},
banlist: function(itemData) {
socket.emit("input", {
target: itemData,
text: "/banlist",
});
},
whois: function(itemData) {
const chan = utils.findCurrentNetworkChan(itemData);