How to restrict node authors from commenting on their own nodes? On my site we have enquiries (nodes) and price quotes (comments). So node authors shouldn't be offered to quote prices to themselves.

That's why I want to disallow node authors comment their own nodes. How can I do so?

Updated: The 'user-compare' option in panels visibility rules could easily allow to achieve what i want. I've used this functionality for other panes i.e. profile fields etc. But  i didn't find 'user-compare' entry in Panels visibility rules for comment form in node template. Why?

I chose the way offered by Pierre.Vriens using Rules because I couldn't  make the code snippet by oksana-c work with Panels. Unpublishing comments with The Rules is not best user experience. Comment Permissions module also didn't help. Any suggestion for unsetting whole comment form for node authors programmatically in Panels environment would be much appreciated.
You'd want to use hook_node_view_alter() in your theme to unset the comment form if the logged in user is same as node author. 

function yourtheme_node_view_alter(&amp;$build) {
    global $user;
    // get the uid of logged in user
    $logged_in_uid = $user-&gt;uid;

    // if content type is 'your_content_type'
    if ($build['#bundle'] == 'your_content_type') {

        //get node author's uid
        $node_author = $build['#node']-&gt;uid;

        // if logged in user is the node author - unset comment form and remove the 'Add comment' links from node display
        if ($node_author == $logged_in_uid) {
            unset($build['comments']['comment_form']);
            unset($build['links']['comment']['#links']['comment-add']);
        }
    }
}


Also, you can check out Comment Permissions module. It does not offer the functionality that you need, but it provides more granular permissions than core comment module.


  The Comment Permissions module enables control of commenting by user role and by node type. Additional user permissions for selected node types are added to the user access system so you can configure commenting with more control than Drupal core provides.