Merge pull request #1858 from thelounge/yamanickill/context-menu-banlist

Add banlist context menu item if user isn't normal user
This commit is contained in:
Jérémie Astori 2017-12-20 20:13:55 -05:00 committed by GitHub
commit 31f1c2bf2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);