FlooUser user = flooHandler.state.getUser(client.userId);
if (user == null) {
return;
}
List<String> permissions = java.util.Arrays.asList(user.perms);
SetPermissionsDialog setPermissionsDialog = new SetPermissionsDialog(
new RunLater<String[]>() {
@Override
public void run(String[] permissions) {
Flog.info("Submitting permission changes.");
FlooHandler flooHandler = context.getFlooHandler();
if (flooHandler == null) {
return;
}
flooHandler.editorEventHandler.changePerms(userId, permissions);
}
},
permissions.contains("get_buf"),
permissions.contains("request_perms"),
permissions.contains("patch"),
permissions.contains("kick")
);
setPermissionsDialog.setUsername(client.username);
setPermissionsDialog.createCenterPanel();
setPermissionsDialog.show();
}
});
popupMenu.add(adminMenuItem);
popupMenu.addPopupMenuListener(new PopupMenuListener() {
@Override